:root {
    --qmk-bg: #09131c;
    --qmk-panel: rgba(8, 20, 29, .91);
    --qmk-panel-strong: rgba(7, 17, 25, .98);
    --qmk-line: rgba(184, 226, 239, .16);
    --qmk-text: #f4fbfd;
    --qmk-muted: #94aeb8;
    --qmk-accent: #41d9d0;
    --qmk-live: #39e3a4;
    --qmk-recent: #ffd166;
    --qmk-stale: #ff7b68;
    --qmk-header-h: 56px;
    --qmk-radius: 18px;
    --qmk-shadow: 0 20px 56px rgba(0, 0, 0, .42);
    --smp-dock-h: 66px;
    --smp-dock-b: 16px;
    --smp-dock-clear: calc(var(--smp-dock-b) + var(--smp-dock-h) + 12px + env(safe-area-inset-bottom, 0px));
    color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; }
body {
    overflow: hidden;
    background: var(--qmk-bg);
    color: var(--qmk-text);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { color: inherit; }

.smp-header {
    position: relative;
    z-index: 1200;
    height: var(--qmk-header-h);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 18px;
    padding: 0 18px;
    background: #07121a;
    border-bottom: 1px solid rgba(181, 229, 241, .14);
    box-shadow: 0 6px 24px rgba(0, 0, 0, .22);
}
.smp-brand {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .1em;
}
.smp-brand > span:last-child > span { color: var(--qmk-accent); }
.smp-brandmark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(65, 217, 208, .48);
    border-radius: 11px;
    background: linear-gradient(145deg, rgba(65, 217, 208, .22), rgba(20, 105, 139, .13));
    box-shadow: inset 0 0 20px rgba(65, 217, 208, .08);
}
.smp-brandmark svg { width: 23px; height: 23px; fill: none; stroke: var(--qmk-accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.smp-headline { color: #c7d8de; font-size: 13px; font-weight: 600; letter-spacing: .04em; }
.smp-live {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--qmk-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .11em;
}
.smp-live-dot { width: 8px; height: 8px; border-radius: 50%; background: #81949b; box-shadow: 0 0 0 4px rgba(129, 148, 155, .1); }
.smp-live.is-ok { color: #b6ffe2; }
.smp-live.is-ok .smp-live-dot { background: var(--qmk-live); box-shadow: 0 0 0 4px rgba(57, 227, 164, .13), 0 0 15px rgba(57, 227, 164, .65); animation: qmk-pulse 2s infinite; }
.smp-live.is-error { color: #ffc1b8; }
.smp-live.is-error .smp-live-dot { background: var(--qmk-stale); }

.qmk-home { position: relative; height: calc(100svh - var(--qmk-header-h)); min-height: 360px; isolation: isolate; background: #0a2832; }
.qmk-map { position: absolute; inset: 0; background: radial-gradient(circle at 60% 35%, #164553, #0a222c 54%, #071820); }
.qmk-map:focus { outline: none; }

.qmk-panel {
    position: absolute;
    z-index: 700;
    top: 14px;
    bottom: 14px;
    left: 14px;
    width: min(430px, 36vw);
    min-width: 340px;
    transition: transform .25s ease, opacity .2s ease;
}
.qmk-panel.is-hidden { transform: translateX(calc(-100% - 24px)); opacity: 0; pointer-events: none; }
.qmk-panel-inner, .qmk-sheet-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--qmk-panel);
    border: 1px solid var(--qmk-line);
    border-radius: var(--qmk-radius);
    box-shadow: var(--qmk-shadow);
    -webkit-backdrop-filter: blur(14px) saturate(125%);
    backdrop-filter: blur(14px) saturate(125%);
}
.qmk-panel-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 20px 18px 14px; }
.qmk-eyebrow { margin-bottom: 4px; color: var(--qmk-accent); font-size: 10px; line-height: 1.2; font-weight: 800; letter-spacing: .14em; }
.qmk-panel-top h1 { margin: 0; font-size: 23px; line-height: 1.2; letter-spacing: -.025em; }
.qmk-iconbtn, .qmk-mapctl, .qmk-chip, .qmk-seg-btn {
    border: 1px solid var(--qmk-line);
    background: rgba(255, 255, 255, .055);
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.qmk-iconbtn:hover, .qmk-mapctl:hover, .qmk-chip:hover, .qmk-seg-btn:hover { background: rgba(65, 217, 208, .13); border-color: rgba(65, 217, 208, .35); }
.qmk-iconbtn:active, .qmk-mapctl:active, .qmk-chip:active { transform: translateY(1px); }
.qmk-iconbtn:focus-visible, .qmk-mapctl:focus-visible, .qmk-chip:focus-visible, .qmk-seg-btn:focus-visible, .qmk-search input:focus-visible { outline: 2px solid var(--qmk-accent); outline-offset: 2px; }
.qmk-iconbtn { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; padding: 0; border-radius: 10px; color: #d7e7ec; }

.qmk-search {
    height: 42px;
    margin: 0 18px 12px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 12px;
    border: 1px solid var(--qmk-line);
    border-radius: 12px;
    background: rgba(0, 0, 0, .18);
}
.qmk-search:focus-within { border-color: rgba(65, 217, 208, .58); box-shadow: 0 0 0 3px rgba(65, 217, 208, .08); }
.qmk-search svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: #8da7b0; stroke-width: 1.8; stroke-linecap: round; }
.qmk-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--qmk-text); font-size: 13px; }
.qmk-search input::placeholder { color: #76919b; }
.qmk-panel-head { min-height: 39px; display: flex; align-items: center; gap: 7px; padding: 0 18px 10px; }
.qmk-chip { min-height: 36px; padding: 0 13px; border-radius: 11px; font-size: 12px; font-weight: 700; }
.qmk-chip-compact { min-height: 31px; padding: 0 10px; border-radius: 9px; color: #d4e4e9; font-size: 11px; }
.qmk-chip-primary { color: #05201e; background: var(--qmk-accent); border-color: var(--qmk-accent); }
.qmk-chip-primary:hover { background: #67e5df; border-color: #67e5df; }
.qmk-count { min-width: 34px; margin-left: auto; padding: 4px 8px; border-radius: 999px; color: #c4d8de; background: rgba(65, 217, 208, .1); font-size: 11px; text-align: center; }
.qmk-legend { display: flex; gap: 14px; padding: 1px 18px 12px; color: var(--qmk-muted); font-size: 10px; border-bottom: 1px solid var(--qmk-line); }
.qmk-legend span { display: inline-flex; align-items: center; gap: 5px; }
.qmk-legend i { width: 7px; height: 7px; border-radius: 50%; }
.qmk-legend .is-live { background: var(--qmk-live); }.qmk-legend .is-recent { background: var(--qmk-recent); }.qmk-legend .is-stale { background: var(--qmk-stale); }

.qmk-panel-list, .qmk-sheet-list { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(123, 164, 176, .35) transparent; }
.qmk-vessel-row {
    width: 100%;
    display: grid;
    grid-template-columns: 13px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    padding: 13px 18px;
    color: inherit;
    text-align: left;
    border: 0;
    border-bottom: 1px solid rgba(181, 229, 241, .095);
    background: transparent;
    cursor: pointer;
}
.qmk-vessel-row:hover, .qmk-vessel-row.is-selected { background: linear-gradient(90deg, rgba(65, 217, 208, .12), rgba(65, 217, 208, .025)); }
.qmk-vessel-row.is-selected { box-shadow: inset 3px 0 var(--qmk-accent); }
.qmk-status-orb { width: 11px; height: 11px; border: 2px solid rgba(255, 255, 255, .3); border-radius: 50%; box-shadow: 0 0 12px currentColor; }
.qmk-status-orb.live { color: var(--qmk-live); background: var(--qmk-live); }.qmk-status-orb.recent { color: var(--qmk-recent); background: var(--qmk-recent); }.qmk-status-orb.stale { color: var(--qmk-stale); background: var(--qmk-stale); }
.qmk-vessel-main { min-width: 0; }
.qmk-vessel-name { overflow: hidden; color: #f3fafc; font-size: 13px; font-weight: 750; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.qmk-vessel-meta { margin-top: 3px; overflow: hidden; color: var(--qmk-muted); font-size: 10px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.qmk-vessel-side { padding-left: 7px; color: #d7e5e9; text-align: right; }
.qmk-vessel-speed { font-size: 12px; font-weight: 800; white-space: nowrap; }
.qmk-vessel-age { margin-top: 3px; color: var(--qmk-muted); font-size: 9px; white-space: nowrap; }
.qmk-list-state { padding: 28px 22px; color: var(--qmk-muted); font-size: 13px; line-height: 1.55; text-align: center; }
.qmk-list-more { padding: 13px 18px 16px; color: #82a0aa; font-size: 10px; text-align: center; }
.qmk-list-hits { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 8px; padding: 9px 12px; border: 1px solid rgba(65, 217, 208, .3); border-radius: 12px; background: rgba(65, 217, 208, .1); color: var(--qmk-accent); font-size: 11px; font-weight: 650; }
.qmk-list-hits button { flex: none; }

.qmk-map-controls { position: absolute; z-index: 800; top: 14px; right: 14px; display: flex; flex-direction: column; gap: 8px; }
.qmk-mapctl { width: 42px; height: 42px; display: grid; place-items: center; padding: 0; border-radius: 13px; background: rgba(7, 18, 27, .91); box-shadow: 0 9px 28px rgba(0, 0, 0, .3); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.qmk-mapctl svg { width: 19px; height: 19px; fill: none; stroke: #e7f3f6; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.qmk-mapctl:nth-child(2) svg { fill: none; }
.qmk-mapctl.is-active { border-color: rgba(65, 217, 208, .58); background: rgba(65, 217, 208, .17); }

.qmk-loading { position: absolute; z-index: 650; left: 50%; top: 18px; transform: translateX(-50%); display: flex; align-items: center; gap: 9px; padding: 9px 13px; border: 1px solid var(--qmk-line); border-radius: 999px; color: #d8e7eb; background: rgba(7, 18, 27, .88); box-shadow: 0 8px 26px rgba(0,0,0,.26); font-size: 11px; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: opacity .2s; }
.qmk-loading.is-hidden { opacity: 0; pointer-events: none; }
.qmk-spinner { width: 13px; height: 13px; border: 2px solid rgba(255, 255, 255, .2); border-top-color: var(--qmk-accent); border-radius: 50%; animation: qmk-spin .7s linear infinite; }

.qmk-filter, .qmk-drawer { position: absolute; z-index: 1300; inset: 0; display: none; }
/* Die Detailansicht liegt ueber der ganzen Karte, soll aber nur mit ihrem
   eigenen Fenster Klicks annehmen. Sonst waeren Bedienleiste, Liste und
   Kartenbedienung blockiert, solange die Details offen sind. */
.qmk-drawer { pointer-events: none; }
.qmk-drawer-panel { pointer-events: auto; }
.qmk-filter.is-open, .qmk-drawer.is-open { display: block; }
.qmk-filter-backdrop, .qmk-drawer-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: rgba(2, 8, 12, .5); cursor: default; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
/* Die Schiffdetails duerfen die Karte weder abdunkeln noch weichzeichnen:
   dort laeuft die Bewegung, die man beim Tracking sehen will. Auf dem Desktop
   bleibt die Karte deshalb voll bedienbar, geschlossen wird ueber das Kreuz. */
.qmk-drawer-backdrop { display: none; }
.qmk-filter-panel {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(440px, calc(100% - 28px));
    transform: translate(-50%, -50%);
    overflow: hidden;
    border: 1px solid var(--qmk-line);
    border-radius: 20px;
    background: var(--qmk-panel-strong);
    box-shadow: var(--qmk-shadow);
}
.qmk-filter-head, .qmk-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px; border-bottom: 1px solid var(--qmk-line); }
.qmk-filter-title, .qmk-drawer-title { font-size: 18px; font-weight: 800; line-height: 1.2; }
.qmk-filter-body { padding: 18px; }
.qmk-filter-section + .qmk-filter-section { margin-top: 22px; }
.qmk-filter-label { margin-bottom: 9px; color: #dce9ed; font-size: 12px; font-weight: 750; }
.qmk-filter-note { margin-top: 8px; color: var(--qmk-muted); font-size: 10px; }
.qmk-seg { display: flex; flex-wrap: wrap; gap: 7px; }
.qmk-seg-btn { min-height: 36px; flex: 1 1 auto; padding: 0 12px; border-radius: 10px; color: #bcd0d6; font-size: 11px; font-weight: 700; }
.qmk-seg-wrap .qmk-seg-btn { flex: 0 1 auto; padding: 0 10px; }
.qmk-seg-btn.is-active { color: #061d1c; border-color: var(--qmk-accent); background: var(--qmk-accent); }
.qmk-filter-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 26px; }

.qmk-drawer-panel { position: absolute; top: 14px; right: 14px; bottom: 14px; width: min(410px, calc(100% - 28px)); overflow: hidden; border: 1px solid var(--qmk-line); border-radius: var(--qmk-radius); background: var(--qmk-panel-strong); box-shadow: var(--qmk-shadow); }
.qmk-drawer-grip { display: none; }
.qmk-drawer-body { height: calc(100% - 78px); overflow: auto; padding: 18px; }
.qmk-detail-hero { padding: 16px; border: 1px solid rgba(65, 217, 208, .22); border-radius: 15px; background: linear-gradient(135deg, rgba(65, 217, 208, .15), rgba(24, 98, 127, .07)); }
.qmk-detail-status { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; color: #bdd1d7; font-size: 10px; font-weight: 800; letter-spacing: .07em; }
.qmk-detail-status i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.qmk-detail-name { font-size: 22px; font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
.qmk-detail-sub { margin-top: 7px; color: var(--qmk-muted); font-size: 11px; }
.qmk-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 14px; }
.qmk-detail-item { min-width: 0; padding: 12px; border: 1px solid var(--qmk-line); border-radius: 12px; background: rgba(255,255,255,.025); }
.qmk-detail-item.is-wide { grid-column: 1 / -1; }
.qmk-detail-key { color: #7f9ba5; font-size: 9px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.qmk-detail-value { margin-top: 4px; color: #e5f0f3; font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.qmk-detail-note { display: block; margin-top: 3px; color: var(--qmk-muted); font-size: 10px; font-weight: 500; }

.qmk-toast { position: absolute; z-index: 1500; left: 50%; bottom: calc(var(--smp-dock-clear) + 6px); transform: translate(-50%, 15px); max-width: min(420px, calc(100% - 30px)); padding: 10px 14px; border: 1px solid var(--qmk-line); border-radius: 11px; color: #e4f0f3; background: rgba(7, 18, 27, .94); box-shadow: var(--qmk-shadow); font-size: 11px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.qmk-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.qmk-noscript { position: fixed; z-index: 3000; inset: auto 20px 20px; padding: 14px; background: #7c2d2d; color: #fff; text-align: center; }
.qmk-only-mobile { display: none; }

.leaflet-container { font-family: inherit; }
.leaflet-control-zoom { border: 1px solid var(--qmk-line) !important; border-radius: 12px !important; overflow: hidden; box-shadow: 0 9px 28px rgba(0,0,0,.26) !important; }
.leaflet-control-zoom a { width: 38px !important; height: 38px !important; line-height: 36px !important; color: #eef8fa !important; background: rgba(7, 18, 27, .92) !important; border-color: var(--qmk-line) !important; }
.leaflet-control-zoom a:hover { background: rgba(65, 217, 208, .18) !important; }
.leaflet-left { left: 444px; transition: left .25s ease; }
.qmk-home.is-list-closed .leaflet-left { left: 0; }
.leaflet-control-attribution { color: #78939c; background: rgba(5, 15, 22, .78) !important; }
.leaflet-control-attribution a { color: #9fc4cd; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { color: var(--qmk-text); background: rgba(6, 17, 25, .97); box-shadow: 0 12px 38px rgba(0,0,0,.38); }
.leaflet-popup-content-wrapper { border: 1px solid var(--qmk-line); border-radius: 14px; }
.leaflet-popup-content { margin: 13px 15px; line-height: 1.45; }
.leaflet-popup-close-button { color: #b8ccd2 !important; }
.qmk-popup-name { padding-right: 12px; font-size: 14px; font-weight: 800; }
.qmk-popup-meta { margin-top: 4px; color: var(--qmk-muted); font-size: 10px; }
.qmk-popup-speed { margin-top: 8px; color: var(--qmk-accent); font-size: 12px; font-weight: 750; }
.qmk-popup-dest { margin-top: 5px; color: #cfe3e8; font-size: 11px; }
.qmk-popup-details { width: 100%; margin-top: 10px; min-height: 34px; font-size: 12px; }

.smp-dock {
    position: absolute;
    z-index: 900;
    left: 50%;
    bottom: calc(var(--smp-dock-b) + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    width: 348px;
    max-width: calc(100% - 24px);
    height: var(--smp-dock-h);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
    padding: 5px;
    border: 1px solid var(--qmk-line);
    border-radius: 18px;
    background: rgba(7, 18, 27, .91);
    box-shadow: 0 12px 34px rgba(0, 0, 0, .36);
    -webkit-backdrop-filter: blur(16px) saturate(125%);
    backdrop-filter: blur(16px) saturate(125%);
}
.smp-dock button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0;
    border: 0;
    border-radius: 13px;
    background: none;
    color: #a8c2ca;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.smp-dock button:hover { color: #e6f4f7; background: rgba(255, 255, 255, .06); }
.smp-dock button[aria-expanded="true"] { color: #eafcfd; background: rgba(65, 217, 208, .16); }
.smp-dock button:focus-visible { outline: 2px solid var(--qmk-accent); outline-offset: -2px; }
.smp-dock svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.smp-dock-dot { display: inline-block; width: 5px; height: 5px; margin-left: 3px; border-radius: 50%; background: var(--qmk-recent); vertical-align: middle; }
.smp-dock-dot[hidden] { display: none; }
.smp-dock-label-narrow { display: none; }

.smp-settings-panel .qmk-filter-body { max-height: min(64vh, 540px); overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(123, 164, 176, .35) transparent; }
.smp-theme-options { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.smp-theme-options button {
    padding: 5px 5px 12px;
    border: 2px solid var(--qmk-line);
    border-radius: 14px;
    background: rgba(255, 255, 255, .03);
    text-align: left;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}
.smp-theme-options button:hover { border-color: rgba(65, 217, 208, .4); }
.smp-theme-options button[aria-pressed="true"] { border-color: var(--qmk-accent); background: rgba(65, 217, 208, .1); }
.smp-theme-options button:focus-visible { outline: 2px solid var(--qmk-accent); outline-offset: 2px; }
.smp-theme-options strong { display: block; margin-top: 9px; padding: 0 6px; font-size: 13px; font-weight: 750; }
.smp-theme-options small { display: block; margin-top: 3px; padding: 0 6px; color: var(--qmk-muted); font-size: 10px; }
.smp-theme-sample { position: relative; display: block; height: 72px; overflow: hidden; border-radius: 9px; background: #bcdbe4; }
.smp-theme-sample::before { content: ''; position: absolute; left: -34px; bottom: -38px; width: 132px; height: 98px; background: #e8ebdf; border-radius: 44% 56% 42% 58%; transform: rotate(-16deg); }
.smp-theme-sample::after { content: ''; position: absolute; top: 30px; right: 14px; width: 74px; height: 2px; background: rgba(255, 255, 255, .85); border-radius: 2px; transform: rotate(-27deg); }
.smp-theme-sample i, .smp-theme-sample b { position: absolute; z-index: 1; width: 9px; height: 9px; border: 2px solid #fff; border-radius: 50%; }
.smp-theme-sample i { top: 16px; right: 48px; background: var(--qmk-live); }
.smp-theme-sample b { top: 42px; right: 20px; background: var(--qmk-recent); }
.smp-theme-sample.is-night { background: #0e2733; }
.smp-theme-sample.is-night::before { background: #26404b; }
.smp-theme-sample.is-night::after { background: rgba(150, 171, 180, .7); }

.smp-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 4px 0 2px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.smp-toggle-row small { display: block; margin-top: 5px; color: var(--qmk-muted); font-size: 11px; font-weight: 400; line-height: 1.5; }
.smp-toggle-row input {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    flex: none;
    width: 43px;
    height: 26px;
    margin: 0;
    border: 0;
    border-radius: 20px;
    background: rgba(255, 255, 255, .17);
    cursor: pointer;
    transition: background .15s ease;
}
.smp-toggle-row input::before { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); transition: transform .15s ease; }
.smp-toggle-row input:checked { background: var(--qmk-accent); }
.smp-toggle-row input:checked::before { transform: translateX(17px); }
.smp-toggle-row input:focus-visible { outline: 2px solid var(--qmk-accent); outline-offset: 2px; }
.smp-layer-status { margin: 9px 0 0; color: var(--qmk-muted); font-size: 10px; line-height: 1.5; }
.smp-layer-status:empty { display: none; }

:root[data-map="dark"] .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) saturate(.42) brightness(.82) contrast(.95); }
:root[data-map="dark"] .leaflet-seamark-pane { filter: brightness(1.35) saturate(1.1); }

.smp-vessel-canvas, .smp-port-canvas { position: absolute; left: 0; top: 0; }
.qmk-popup-eyebrow { margin-bottom: 3px; color: var(--qmk-accent); font-size: 9px; font-weight: 800; letter-spacing: .12em; }

.smp-flag {
    width: 16px;
    height: 12px;
    flex: 0 0 auto;
    margin-right: 6px;
    display: inline-block;
    vertical-align: -1px;
    border-radius: 2px;
    object-fit: cover;
    background: rgba(255, 255, 255, .08);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .22);
}
.qmk-detail-sub .smp-flag, .qmk-popup-meta .smp-flag { vertical-align: -2px; }
.qmk-detail-value .smp-flag { width: 18px; height: 13px; }

.smp-legend { position: relative; }
.smp-legend-toggle svg { stroke-width: 2; }
.smp-legend[data-open="true"] .smp-legend-toggle { border-color: rgba(65, 217, 208, .58); background: rgba(65, 217, 208, .17); }
.smp-legend-body {
    position: absolute;
    z-index: 1;
    top: calc(100% + 8px);
    right: 0;
    width: max-content;
    max-width: min(250px, calc(100vw - 30px));
    border: 1px solid var(--qmk-line);
    border-radius: 14px;
    background: rgba(7, 18, 27, .93);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .38);
    -webkit-backdrop-filter: blur(14px) saturate(125%);
    backdrop-filter: blur(14px) saturate(125%);
}
.smp-legend-body { padding: 11px 13px 12px; }
.smp-legend-title { margin: 0 0 6px; color: var(--qmk-accent); font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.smp-legend-list { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 12px; margin: 0 0 11px; padding: 0; list-style: none; }
.smp-legend-list:last-child { margin-bottom: 0; }
.smp-legend-list li { display: flex; align-items: center; gap: 6px; color: #cadde3; font-size: 10px; line-height: 1.5; white-space: nowrap; }
.smp-legend-icon { width: 18px; height: 18px; flex: 0 0 auto; }
.smp-legend-status i { width: 9px; height: 9px; flex: 0 0 auto; margin-left: 4px; border-radius: 50%; }
.smp-legend-status .is-live { background: var(--qmk-live); }
.smp-legend-status .is-recent { background: var(--qmk-recent); }
.smp-legend-status .is-stale { background: var(--qmk-stale); }

.smp-track {
    margin-top: 16px;
    padding-top: 15px;
    border-top: 1px solid var(--qmk-line);
}
.smp-track .qmk-seg { margin-top: 9px; }
.smp-track-status { margin: 11px 0 0; color: var(--qmk-muted); font-size: 11px; line-height: 1.55; }
.smp-track-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.smp-track-stat {
    min-width: 0;
    padding: 9px 11px;
    border: 1px solid var(--qmk-line);
    border-radius: 11px;
    background: rgba(255, 255, 255, .025);
}
.smp-track-stat span { display: block; color: #7f9ba5; font-size: 9px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.smp-track-stat b { display: block; margin-top: 3px; color: #e5f0f3; font-size: 12px; font-weight: 700; overflow-wrap: anywhere; }

.smp-track-player { margin-top: 13px; }
.smp-track-row { display: flex; align-items: center; gap: 8px; }
.smp-track-row .qmk-iconbtn svg { width: 15px; height: 15px; fill: currentColor; stroke: none; }
.smp-track-speed { min-width: 46px; flex: 0 0 auto; text-align: center; }
.smp-track-slider {
    flex: 1 1 auto;
    min-width: 0;
    height: 26px;
    margin: 0;
    padding: 0;
    appearance: none;
    -webkit-appearance: none;
    background: none;
    cursor: pointer;
    touch-action: none;
}
.smp-track-slider::-webkit-slider-runnable-track { height: 4px; border-radius: 999px; background: rgba(255, 255, 255, .16); }
.smp-track-slider::-moz-range-track { height: 4px; border-radius: 999px; background: rgba(255, 255, 255, .16); }
.smp-track-slider::-webkit-slider-thumb {
    appearance: none; -webkit-appearance: none;
    width: 15px; height: 15px; margin-top: -5.5px;
    border: 0; border-radius: 50%; background: #8fb4ff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .45);
}
.smp-track-slider::-moz-range-thumb { width: 15px; height: 15px; border: 0; border-radius: 50%; background: #8fb4ff; }
.smp-track-slider:focus-visible { outline: 2px solid var(--qmk-accent); outline-offset: 3px; }
.smp-track-time { margin-top: 7px; color: #cadde3; font-size: 11px; font-variant-numeric: tabular-nums; }
.smp-track-time.is-gap { color: var(--qmk-recent); }

/* Ring in der Routenfarbe: sonst waere die abgespielte Position vom
   Live-Schiff nicht zu unterscheiden - beide nutzen dasselbe Typsymbol. */
.smp-replay-marker {
    background: rgba(143, 180, 255, .1);
    border: 0;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(143, 180, 255, .9), 0 0 16px rgba(143, 180, 255, .45);
}
.smp-replay-marker canvas { display: block; width: 34px; height: 34px; will-change: transform; }

@keyframes qmk-spin { to { transform: rotate(360deg); } }
@keyframes qmk-pulse { 50% { box-shadow: 0 0 0 7px rgba(57, 227, 164, 0), 0 0 18px rgba(57, 227, 164, .72); } }

@media (min-width: 981px) and (max-width: 1240px) {
    .qmk-panel { bottom: var(--smp-dock-clear); }
    .leaflet-bottom { bottom: calc(var(--smp-dock-clear) - 18px); }
}

@media (max-width: 980px) {
    :root { --qmk-mobile-sheet-h: 52vh; --smp-dock-h: 60px; --smp-dock-b: 10px; }
    .qmk-only-desktop { display: none; }
    .qmk-only-mobile { display: block; }
    .leaflet-left { left: 0; }
    .qmk-loading { top: 12px; max-width: calc(100% - 132px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .qmk-sheet { position: absolute; z-index: 750; left: 8px; right: 8px; bottom: var(--smp-dock-clear); height: min(var(--qmk-mobile-sheet-h), calc(100% - var(--smp-dock-clear) - 14px)); transition: transform .25s ease, opacity .2s ease; }
    .qmk-sheet.is-hidden { transform: translateY(calc(100% + 14px)); opacity: 0; pointer-events: none; }
    .qmk-sheet-inner { border-radius: 20px; }
    .qmk-sheet-head { padding: 8px 12px 10px; border-bottom: 1px solid var(--qmk-line); touch-action: none; }
    .qmk-sheet-grip { width: 42px; height: 4px; margin: 0 auto 8px; border-radius: 999px; background: rgba(189, 216, 224, .35); }
    .qmk-sheet-headrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .qmk-sheet-title { font-size: 16px; font-weight: 800; }
    .qmk-sheet-subtitle { margin-top: 2px; color: var(--qmk-muted); font-size: 9px; }
    .qmk-sheet-actions { display: flex; gap: 7px; }
    .qmk-search-mobile { height: 38px; margin: 10px 0 0; }
    .qmk-vessel-row { padding: 12px 14px; }
    .qmk-map-controls { top: 12px; right: 10px; }
    .leaflet-bottom { bottom: calc(var(--smp-dock-clear) - 18px); }
    .qmk-mapctl { width: 39px; height: 39px; }
    .qmk-drawer-panel { top: auto; left: 8px; right: 8px; bottom: var(--smp-dock-clear); width: auto; height: min(46vh, 400px); max-height: calc(100% - var(--smp-dock-clear) - 14px); border-radius: 20px; }
    .qmk-drawer-grip { display: block; width: 42px; height: 4px; margin: 8px auto -4px; border-radius: 999px; background: rgba(189, 216, 224, .35); }
    .qmk-drawer-head { padding-top: 15px; }
    .qmk-drawer-body { height: calc(100% - 86px); }
    .qmk-toast { bottom: calc(var(--smp-dock-clear) + 4px); }
    .smp-legend-body { max-height: 46vh; overflow: auto; padding: 10px 11px 11px; }
    .smp-legend-list { grid-template-columns: 1fr; gap: 2px; }
}

@media (max-width: 560px) {
    .smp-header { grid-template-columns: 1fr auto; padding: 0 12px; }
    .smp-headline { display: none; }
    .smp-brand { font-size: 13px; }
    .smp-brandmark { width: 32px; height: 32px; }
    .smp-live { font-size: 9px; }
    .qmk-filter-panel { top: auto; bottom: var(--smp-dock-clear); max-height: calc(100% - var(--smp-dock-clear) - 14px); transform: translateX(-50%); border-radius: 20px; }
    .smp-dock-label-wide { display: none; }
    .smp-dock-label-narrow { display: inline; }
    .qmk-filter-head, .qmk-drawer-head { padding: 15px; }
    .qmk-filter-body { padding: 15px; }
    .qmk-filter-actions { justify-content: stretch; }
    .qmk-filter-actions .qmk-chip { flex: 1; }
}

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