:root {
    color-scheme: dark;
    --ink: #061723;
    --ink-2: #091e2c;
    --ink-3: #0d2938;
    --panel: rgba(6, 23, 35, .96);
    --panel-soft: rgba(12, 39, 53, .82);
    --line: rgba(221, 177, 90, .34);
    --line-soft: rgba(170, 211, 220, .16);
    --parchment: #f3ead8;
    --muted: #a8bac1;
    --gold: #d8a84d;
    --gold-bright: #f0ca76;
    --cyan: #55c9ef;
    --cyan-dark: #1e82aa;
    --jade: #63c98f;
    --violet: #a06bdc;
    --danger: #e87572;
    --shadow: 0 18px 50px rgba(0, 0, 0, .38);
    --radius: 16px;
    --topbar: 82px;
    --rail: 78px;
    --display: Georgia, "Times New Roman", serif;
    --ui: "Segoe UI", Candara, Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

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

body {
    overflow: hidden;
    background: var(--ink);
    color: var(--parchment);
    font-family: var(--ui);
    font-size: 15px;
    line-height: 1.5;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    color: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 3px;
}

[hidden] {
    display: none !important;
}

.skip-link {
    position: fixed;
    z-index: 1000;
    top: 10px;
    left: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--parchment);
    color: var(--ink);
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: translateY(0);
}

.topbar {
    position: relative;
    z-index: 50;
    display: grid;
    grid-template-columns: minmax(250px, 1fr) auto minmax(250px, 1fr);
    align-items: center;
    min-height: var(--topbar);
    padding: 10px 22px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, #071a28 0%, #061723 100%);
    box-shadow: 0 8px 30px rgba(0, 0, 0, .28);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    width: max-content;
    color: inherit;
    text-decoration: none;
}

.brand-logo {
    position: relative;
    display: grid;
    width: 150px;
    height: 52px;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(216, 168, 77, .52);
    border-radius: 12px;
    background: #f7f8fa;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .7), 0 8px 22px rgba(0, 0, 0, .18);
}

.brand-logo img {
    width: 160px;
    max-width: none;
    transform: translateY(-29%) scale(1.08);
}

.brand-title {
    color: var(--gold-bright);
    font-family: var(--display);
    font-size: clamp(1.25rem, 1.7vw, 1.8rem);
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.filters {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px;
    overflow-x: auto;
    scrollbar-width: none;
}

.filters::-webkit-scrollbar {
    display: none;
}

.filter {
    min-height: 42px;
    padding: 0 15px;
    border: 1px solid rgba(169, 196, 204, .2);
    border-radius: 10px;
    background: rgba(255, 255, 255, .025);
    color: #c8d4d8;
    cursor: pointer;
    font-size: .88rem;
    font-weight: 650;
    transition: border-color .2s ease, background .2s ease, color .2s ease, transform .2s ease;
    white-space: nowrap;
}

.filter:hover {
    border-color: rgba(85, 201, 239, .5);
    color: white;
    transform: translateY(-1px);
}

.filter.is-active {
    border-color: var(--cyan);
    background: rgba(85, 201, 239, .12);
    box-shadow: inset 0 0 16px rgba(85, 201, 239, .08), 0 0 16px rgba(85, 201, 239, .1);
    color: white;
}

.header-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
}

.button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 17px;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    font-size: .88rem;
    font-weight: 700;
    transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button svg,
.icon-button svg,
.map-tools svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.button-primary {
    border-color: #efc66b;
    background: linear-gradient(180deg, #e3b65e, #bd812b);
    box-shadow: 0 8px 20px rgba(183, 120, 31, .2), inset 0 1px rgba(255, 255, 255, .45);
    color: #10202a;
}

.button-primary:hover {
    box-shadow: 0 10px 26px rgba(211, 151, 55, .3), inset 0 1px rgba(255, 255, 255, .5);
}

.button-ghost {
    border-color: rgba(216, 168, 77, .32);
    background: rgba(255, 255, 255, .025);
    color: var(--parchment);
}

.button-ghost:hover {
    border-color: var(--gold);
    background: rgba(216, 168, 77, .08);
}

.button.full {
    width: 100%;
}

.app-shell {
    position: relative;
    display: grid;
    grid-template-columns: var(--rail) 1fr;
    height: calc(100dvh - var(--topbar));
    overflow: hidden;
}

.progress-rail {
    position: relative;
    z-index: 12;
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 9px;
    padding: 23px 10px 18px;
    border-right: 1px solid rgba(216, 168, 77, .2);
    background: rgba(5, 19, 29, .92);
    box-shadow: 6px 0 24px rgba(0, 0, 0, .16);
}

.progress-orb {
    display: grid;
    width: 55px;
    height: 55px;
    place-items: center;
    border: 2px solid rgba(85, 201, 239, .65);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(85, 201, 239, .14), transparent 68%);
    box-shadow: 0 0 0 6px rgba(85, 201, 239, .04), inset 0 0 16px rgba(85, 201, 239, .09);
    color: white;
    font-size: .84rem;
    font-weight: 800;
}

.progress-label {
    color: var(--muted);
    font-size: .65rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.phase-rail {
    position: relative;
    display: flex;
    flex: 1;
    align-items: center;
    flex-direction: column;
    justify-content: space-around;
    width: 24px;
    min-height: 240px;
    margin-top: 4px;
}

.phase-rail::before {
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: 50%;
    width: 2px;
    background: linear-gradient(var(--gold), var(--cyan), rgba(168, 186, 193, .2));
    content: "";
    transform: translateX(-50%);
}

.phase-mark {
    position: relative;
    z-index: 1;
    display: grid;
    width: 16px;
    height: 16px;
    place-items: center;
    border: 2px solid #62727a;
    border-radius: 50%;
    background: var(--ink);
    color: transparent;
}

.phase-mark.is-done {
    border-color: var(--jade);
    background: #183c32;
}

.phase-mark.is-current {
    border-color: var(--cyan);
    background: #15465a;
    box-shadow: 0 0 12px rgba(85, 201, 239, .55);
}

.map-stage {
    position: relative;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    background: #061926;
}

.map-viewport {
    position: absolute;
    inset: 0;
    overflow: hidden;
    cursor: grab;
    touch-action: none;
}

.map-viewport.is-dragging {
    cursor: grabbing;
}

.map-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 2400px;
    height: 1200px;
    overflow: hidden;
    background-color: #08202e;
    background-image: url("../images/aurelis-map.png");
    background-position: center;
    background-size: cover;
    box-shadow: inset 0 0 120px rgba(0, 0, 0, .38);
    transform-origin: 0 0;
    will-change: transform;
}

.map-canvas::after {
    position: absolute;
    z-index: 0;
    inset: 0;
    background-image: radial-gradient(circle at 50% 45%, transparent 0 42%, rgba(3, 16, 25, .18) 100%);
    content: "";
    pointer-events: none;
}

.connections {
    position: absolute;
    z-index: 1;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.connection {
    fill: none;
    stroke: rgba(221, 177, 90, .78);
    stroke-linecap: round;
    stroke-width: 5;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .65));
    vector-effect: non-scaling-stroke;
}

.connection.main {
    stroke: url(#goldPath);
    stroke-width: 8;
}

.connection.branch {
    stroke: rgba(93, 202, 234, .68);
    stroke-dasharray: 7 10;
    stroke-width: 3;
}

.connection.sequence {
    stroke: rgba(221, 177, 90, .55);
    stroke-width: 3;
}

.connection.is-dimmed {
    opacity: .08;
}

.nodes {
    position: absolute;
    z-index: 4;
    inset: 0;
}

.roadmap-node {
    position: absolute;
    display: flex;
    align-items: center;
    flex-direction: column;
    width: 170px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    transform: translate(-50%, -50%);
    transition: opacity .25s ease, filter .25s ease;
}

.roadmap-node.is-filtered {
    opacity: .1;
    filter: grayscale(1);
    pointer-events: none;
}

.node-medallion {
    position: relative;
    display: grid;
    width: 108px;
    height: 108px;
    place-items: center;
    border: 3px solid var(--gold);
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #234a57, #091a27 68%);
    box-shadow: 0 0 0 5px rgba(6, 23, 35, .88), 0 0 0 7px rgba(216, 168, 77, .22), 0 12px 24px rgba(0, 0, 0, .48);
    color: var(--gold-bright);
    font-family: var(--display);
    font-size: 2rem;
    font-weight: 700;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.node-medallion::before,
.node-medallion::after {
    position: absolute;
    width: 7px;
    height: 7px;
    border: 1px solid var(--gold);
    background: var(--ink);
    content: "";
    transform: rotate(45deg);
}

.node-medallion::before {
    top: 4px;
    left: 8px;
}

.node-medallion::after {
    right: 8px;
    bottom: 4px;
}

.roadmap-node[data-category="story"] .node-medallion {
    background: radial-gradient(circle at 35% 30%, #3d2d58, #121527 70%);
}

.roadmap-node[data-category="world"] .node-medallion {
    background: radial-gradient(circle at 35% 30%, #295849, #0d2425 70%);
}

.roadmap-node[data-category="systems"] .node-medallion {
    background: radial-gradient(circle at 35% 30%, #3d5360, #10232d 70%);
}

.roadmap-node[data-category="online"] .node-medallion {
    background: radial-gradient(circle at 35% 30%, #1b5872, #0a2432 70%);
}

.roadmap-node[data-category="endgame"] .node-medallion {
    background: radial-gradient(circle at 35% 30%, #655126, #1b1e22 72%);
}

.roadmap-node.has-art .node-medallion {
    background-color: #0b2635;
    background-position: center;
    background-size: cover;
}

.roadmap-node.has-art .node-glyph {
    opacity: 0;
}

.roadmap-node[data-size="minor"] {
    width: 144px;
}

.roadmap-node[data-size="minor"] .node-medallion {
    width: 72px;
    height: 72px;
    border-width: 2px;
    font-size: 1.25rem;
}

.roadmap-node[data-size="hero"] .node-medallion {
    width: 128px;
    height: 128px;
    border-color: var(--gold-bright);
    box-shadow: 0 0 0 6px rgba(6, 23, 35, .9), 0 0 0 8px rgba(240, 202, 118, .3), 0 0 30px rgba(85, 201, 239, .2), 0 16px 34px rgba(0, 0, 0, .5);
    font-size: 2.4rem;
}

.roadmap-node:hover .node-medallion,
.roadmap-node.is-selected .node-medallion {
    border-color: var(--cyan);
    box-shadow: 0 0 0 5px rgba(6, 23, 35, .9), 0 0 0 8px rgba(85, 201, 239, .3), 0 0 32px rgba(85, 201, 239, .45), 0 15px 30px rgba(0, 0, 0, .5);
    transform: translateY(-5px) scale(1.04);
}

.node-title {
    position: relative;
    min-width: 116px;
    max-width: 178px;
    margin-top: 14px;
    padding: 8px 13px 9px;
    border: 1px solid var(--gold);
    border-radius: 4px;
    background: rgba(5, 20, 30, .94);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .35);
    color: var(--parchment);
    font-family: var(--display);
    font-size: 1.12rem;
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
    text-wrap: balance;
}

.roadmap-node[data-size="minor"] .node-title {
    min-width: 104px;
    margin-top: 10px;
    padding: 6px 9px;
    font-family: var(--ui);
    font-size: .86rem;
    font-weight: 750;
}

.node-status {
    position: absolute;
    right: -4px;
    bottom: -2px;
    display: grid;
    width: 23px;
    height: 23px;
    place-items: center;
    border: 3px solid var(--ink);
    border-radius: 50%;
    background: #5f7078;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .4);
}

.node-status::after {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: white;
    content: "";
}

.roadmap-node[data-status="planned"] .node-status {
    background: #d49a30;
}

.roadmap-node[data-status="in_progress"] .node-status {
    background: #2698c5;
}

.roadmap-node[data-status="done"] .node-status {
    background: #3ca46a;
}

.roadmap-node[data-status="done"] .node-status::after {
    width: 8px;
    height: 4px;
    border: solid white;
    border-width: 0 0 2px 2px;
    border-radius: 0;
    background: transparent;
    transform: rotate(-45deg) translate(1px, -1px);
}

.legend,
.map-tools,
.map-hint {
    position: absolute;
    z-index: 15;
    border: 1px solid rgba(216, 168, 77, .28);
    background: rgba(5, 20, 30, .9);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.legend {
    bottom: 14px;
    left: 14px;
    display: flex;
    gap: 18px;
    padding: 11px 15px;
    border-radius: 9px;
    color: #c8d3d6;
    font-size: .74rem;
}

.legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border: 2px solid var(--ink);
    border-radius: 50%;
    box-shadow: 0 0 0 2px #65757d;
}

.status-planned {
    background: #d49a30;
    box-shadow: 0 0 0 2px #d49a30;
}

.status-in_progress {
    background: #2698c5;
    box-shadow: 0 0 0 2px #2698c5;
}

.status-done {
    background: #3ca46a;
    box-shadow: 0 0 0 2px #3ca46a;
}

.map-tools {
    right: 14px;
    bottom: 14px;
    display: flex;
    min-height: 44px;
    align-items: stretch;
    overflow: hidden;
    border-radius: 9px;
}

.map-tools button,
.map-tools output {
    display: grid;
    min-width: 44px;
    place-items: center;
    border: 0;
    border-right: 1px solid var(--line-soft);
    background: transparent;
    color: var(--parchment);
}

.map-tools button {
    cursor: pointer;
    font-size: 1.35rem;
}

.map-tools button:hover {
    background: rgba(85, 201, 239, .09);
}

.map-tools output {
    min-width: 66px;
    color: var(--muted);
    font-size: .75rem;
}

.map-hint {
    top: 13px;
    right: 13px;
    margin: 0;
    padding: 8px 11px;
    border-color: rgba(169, 196, 204, .14);
    border-radius: 7px;
    color: rgba(218, 229, 231, .68);
    font-size: .68rem;
    letter-spacing: .02em;
}

.detail-panel {
    position: fixed;
    z-index: 40;
    top: calc(var(--topbar) + 10px);
    right: 10px;
    bottom: 10px;
    width: min(440px, calc(100vw - 30px));
    overflow-y: auto;
    border: 1px solid rgba(216, 168, 77, .42);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: -14px 0 50px rgba(0, 0, 0, .42);
    opacity: 0;
    overscroll-behavior: contain;
    transform: translateX(calc(100% + 24px));
    transition: transform .32s cubic-bezier(.2, .8, .2, 1), opacity .24s ease;
}

.detail-panel.is-open {
    opacity: 1;
    transform: translateX(0);
}

.detail-close,
.modal-close {
    position: absolute;
    z-index: 3;
    top: 13px;
    right: 13px;
}

.icon-button {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid rgba(169, 196, 204, .18);
    border-radius: 9px;
    background: rgba(5, 20, 30, .74);
    color: var(--muted);
    cursor: pointer;
}

.icon-button:hover {
    border-color: var(--cyan);
    color: white;
}

.detail-hero {
    position: relative;
    min-height: 230px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    border-radius: 15px 15px 0 0;
    background: #0c2634;
}

.detail-hero img {
    display: block;
    width: 100%;
    height: 230px;
    object-fit: cover;
}

.detail-hero::after {
    position: absolute;
    inset: 42% 0 0;
    background: linear-gradient(transparent, var(--panel));
    content: "";
    pointer-events: none;
}

.detail-heading {
    position: relative;
    z-index: 1;
    margin-top: -62px;
    padding: 0 24px 18px;
}

.detail-heading.no-art {
    margin: 0;
    padding-top: 36px;
    border-bottom: 1px solid var(--line-soft);
}

.detail-heading h2 {
    max-width: 330px;
    margin: 0 0 7px;
    color: var(--parchment);
    font-family: var(--display);
    font-size: clamp(1.75rem, 3vw, 2.35rem);
    line-height: 1.05;
}

.detail-heading p {
    margin: 0;
    color: #c0cdd1;
    font-size: .86rem;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 15px 24px 0;
}

.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border: 1px solid rgba(169, 196, 204, .16);
    border-radius: 999px;
    background: rgba(255, 255, 255, .025);
    color: #c4d1d5;
    font-size: .68rem;
    font-weight: 700;
}

.meta-chip::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--cyan);
    content: "";
}

.detail-body {
    padding: 8px 24px 26px;
}

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

.detail-section:last-child {
    border-bottom: 0;
}

.detail-section h3 {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 9px;
    color: var(--gold-bright);
    font-family: var(--display);
    font-size: 1.08rem;
}

.detail-section h3 span {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 1px solid rgba(216, 168, 77, .34);
    border-radius: 8px;
    background: rgba(216, 168, 77, .06);
    font-family: var(--ui);
    font-size: .9rem;
}

.detail-section p {
    margin: 0;
    color: #b9c7cc;
    font-size: .84rem;
}

.feature-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.feature-list li {
    position: relative;
    padding: 9px 11px 9px 31px;
    border: 1px solid rgba(169, 196, 204, .12);
    border-radius: 8px;
    background: rgba(255, 255, 255, .018);
    color: #d3dddf;
    font-size: .79rem;
}

.feature-list li::before {
    position: absolute;
    top: 11px;
    left: 12px;
    width: 8px;
    height: 8px;
    border: 2px solid var(--cyan);
    border-radius: 50%;
    content: "";
}

.dependency-card {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px;
    border: 1px solid rgba(216, 168, 77, .22);
    border-radius: 9px;
    background: rgba(216, 168, 77, .045);
}

.dependency-card strong {
    display: block;
    color: var(--parchment);
    font-family: var(--display);
}

.dependency-card small {
    color: var(--muted);
}

.dependency-icon {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid var(--gold);
    border-radius: 50%;
    color: var(--gold-bright);
}

.detail-actions {
    display: flex;
    gap: 9px;
    padding-top: 18px;
}

.detail-actions .button {
    flex: 1;
}

.button-danger {
    border-color: rgba(232, 117, 114, .4);
    background: rgba(232, 117, 114, .07);
    color: #ffc2c0;
}

.button-danger:hover {
    border-color: var(--danger);
    background: rgba(232, 117, 114, .12);
}

.modal {
    width: min(720px, calc(100vw - 28px));
    max-width: none;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
}

.modal::backdrop {
    background: rgba(2, 9, 14, .76);
    backdrop-filter: blur(7px);
}

.modal-card {
    position: relative;
    margin: 0;
    padding: 28px;
    border: 1px solid rgba(216, 168, 77, .45);
    border-radius: 18px;
    background: linear-gradient(155deg, #0b2635, #061824 60%);
    box-shadow: 0 30px 100px rgba(0, 0, 0, .62);
}

.modal-card.compact {
    width: min(430px, 100%);
    margin: auto;
    padding: 35px;
    text-align: center;
}

.modal-symbol {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    margin: 0 auto 14px;
    border: 1px solid rgba(216, 168, 77, .5);
    border-radius: 50%;
    background: rgba(216, 168, 77, .08);
    color: var(--gold-bright);
    font-size: 1.3rem;
}

.modal-card h2 {
    margin: 0 0 8px;
    font-family: var(--display);
    font-size: 1.75rem;
}

.modal-card p {
    margin: 0 0 20px;
    color: var(--muted);
    font-size: .86rem;
}

.field {
    display: grid;
    gap: 7px;
    text-align: left;
}

.field span {
    color: #c8d4d8;
    font-size: .72rem;
    font-weight: 750;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 43px;
    padding: 10px 12px;
    border: 1px solid rgba(169, 196, 204, .22);
    border-radius: 9px;
    background: rgba(0, 0, 0, .2);
    color: var(--parchment);
    transition: border-color .18s ease, box-shadow .18s ease;
}

.field textarea {
    min-height: auto;
    resize: vertical;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
    border-color: rgba(85, 201, 239, .48);
}

.compact .field {
    margin-bottom: 14px;
}

.form-heading {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-right: 44px;
}

.form-heading .modal-symbol {
    flex: 0 0 auto;
    margin: 0;
}

.form-heading p {
    margin: 0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
    max-height: min(62vh, 650px);
    margin-top: 22px;
    padding: 2px 6px 2px 2px;
    overflow-y: auto;
}

.field.wide {
    grid-column: 1 / -1;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.form-error {
    min-height: 20px;
    margin: 10px 0 0 !important;
    color: #ffaaa7 !important;
    font-size: .78rem !important;
}

.toast {
    position: fixed;
    z-index: 200;
    right: 20px;
    bottom: 20px;
    max-width: 380px;
    padding: 12px 16px;
    border: 1px solid rgba(85, 201, 239, .4);
    border-radius: 10px;
    background: #0b2a39;
    box-shadow: var(--shadow);
    color: white;
    font-size: .82rem;
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px);
    transition: opacity .2s ease, transform .2s ease;
}

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

.toast.is-error {
    border-color: rgba(232, 117, 114, .65);
    background: #3a1c22;
}

@media (max-width: 1120px) {
    :root {
        --topbar: 132px;
    }

    .topbar {
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        gap: 5px 12px;
        padding: 10px 14px 8px;
    }

    .brand-logo {
        width: 130px;
        height: 46px;
    }

    .brand-logo img {
        width: 142px;
    }

    .filters {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-content: flex-start;
        padding-left: 0;
    }

    .header-actions {
        grid-column: 2;
        grid-row: 1;
    }

    .filter {
        min-height: 37px;
    }
}

@media (max-width: 680px) {
    :root {
        --topbar: 126px;
        --rail: 0px;
    }

    .topbar {
        grid-template-columns: minmax(0, 1fr) auto;
        padding-inline: 10px;
    }

    .brand {
        gap: 8px;
    }

    .brand-logo {
        width: 105px;
        height: 40px;
        border-radius: 9px;
    }

    .brand-logo img {
        width: 116px;
    }

    .brand-title {
        font-size: .95rem;
    }

    .header-actions .button {
        min-height: 40px;
        padding-inline: 12px;
    }

    .header-actions .button span {
        display: none;
    }

    .app-shell {
        display: block;
    }

    .progress-rail,
    .map-hint {
        display: none;
    }

    .map-stage {
        height: 100%;
    }

    .legend {
        right: 9px;
        bottom: 62px;
        left: 9px;
        justify-content: space-between;
        gap: 5px;
        padding: 9px 10px;
        overflow-x: auto;
        font-size: .65rem;
    }

    .map-tools {
        right: 9px;
        bottom: 9px;
    }

    .detail-panel {
        top: auto;
        right: 6px;
        bottom: 6px;
        left: 6px;
        width: auto;
        max-height: calc(100dvh - 145px);
        border-radius: 18px;
        opacity: 0;
        transform: translateY(calc(100% + 20px));
    }

    .detail-panel.is-open {
        opacity: 1;
        transform: translateY(0);
    }

    .detail-hero,
    .detail-hero img {
        height: 190px;
        min-height: 190px;
    }

    .detail-heading,
    .detail-body,
    .detail-meta {
        padding-right: 18px;
        padding-left: 18px;
    }

    .detail-actions {
        flex-direction: column;
    }

    .modal-card {
        padding: 22px 18px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        max-height: 64vh;
    }

    .field.wide {
        grid-column: auto;
    }

    .form-actions {
        position: sticky;
        bottom: -22px;
        margin: 18px -18px -22px;
        padding: 13px 18px 18px;
        background: #071a27;
    }
}

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