:root {
    color-scheme: light;
    --bg: #f4f2ec;
    --panel: #fffdf7;
    --panel-strong: #f8f6ef;
    --ink: #1c2520;
    --muted: #65706a;
    --line: #d8d4c8;
    --field: #ffffff;
    --green: #2e6b43;
    --green-dark: #1e4f32;
    --amber: #b77d2a;
    --blue: #315f7c;
    --red: #a13b35;
    --shadow: 0 18px 50px rgba(31, 37, 33, 0.18);
    --radius: 8px;
    --font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 14px;
    overflow-x: hidden;
    touch-action: manipulation;
}

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

button {
    cursor: pointer;
}

[hidden] {
    display: none !important;
}

svg {
    display: block;
}

.auth-shell {
    min-height: 100%;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(46, 107, 67, 0.18), rgba(183, 125, 42, 0.16)),
        var(--bg);
}

.auth-panel {
    width: min(100%, 420px);
    padding: 28px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.brand-row {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 28px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    color: #fff;
    background: var(--green-dark);
}

.brand-mark svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

.brand-row h1,
.side-header h1,
.detail-header h2 {
    margin: 0;
    font-size: 26px;
    line-height: 1.1;
}

.brand-row p,
.eyebrow {
    margin: 0;
    color: var(--muted);
}

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

.auth-form {
    display: grid;
    gap: 14px;
}

.auth-form h2 {
    margin: 0 0 4px;
    font-size: 18px;
}

.message {
    min-height: 22px;
    margin: 14px 0 0;
    color: var(--red);
    font-weight: 650;
}

.app-shell {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    display: grid;
    grid-template-columns: 324px minmax(0, 1fr);
    overflow: hidden;
}

.app-shell.navigation-minimal {
    display: block;
}

.app-shell.navigation-minimal .sidebar,
.app-shell.navigation-minimal .desktop-sidebar-toggle {
    display: none;
}

.app-shell.navigation-minimal .map-stage {
    position: fixed;
    inset: 0;
}

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

.sidebar {
    min-height: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    overflow: auto;
    overflow-x: hidden;
    background: var(--panel);
    border-right: 1px solid var(--line);
}

.app-shell.sidebar-collapsed .sidebar {
    padding: 0;
    border-right: 0;
    overflow: hidden;
}

.desktop-sidebar-toggle {
    position: fixed;
    top: 50%;
    left: 324px;
    z-index: 12;
    display: grid;
    place-items: center;
    width: 24px;
    height: 56px;
    padding: 0;
    transform: translate(-50%, -50%);
    border: 1px solid var(--line);
    border-radius: 0 8px 8px 0;
    background: var(--panel);
    color: var(--ink);
    box-shadow: 0 8px 24px rgba(31, 37, 33, 0.16);
}

.desktop-sidebar-toggle svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.app-shell.sidebar-collapsed .desktop-sidebar-toggle {
    left: 0;
    transform: translate(0, -50%) rotate(180deg);
}

.side-header,
.block-title,
.detail-header,
.detail-actions,
.form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.side-header h1 {
    font-size: 22px;
}

.side-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sheet-handle {
    display: none;
}

.sheet-handle span {
    display: block;
}

.icon-button {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
}

.icon-button:hover,
.icon-button:focus-visible,
.ghost-button:hover,
.tool-button:hover,
.feature-item:hover {
    border-color: var(--green);
}

.icon-button svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.icon-button.danger {
    color: var(--red);
}

.area-summary {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.area-summary div,
.position-fields,
.distance-card {
    padding: 12px;
    background: var(--panel-strong);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.area-summary span,
.position-fields span,
.distance-card span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
    text-transform: uppercase;
}

.area-summary strong,
.position-fields strong,
.distance-card strong {
    display: block;
    margin-top: 4px;
    font-size: 18px;
}

.control-block,
.feature-section {
    display: grid;
    gap: 9px;
    min-width: 0;
}

.block-title h2,
.block-title h3 {
    margin: 0;
    font-size: 14px;
}

.field {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.field input,
.field textarea,
.field select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    color: var(--ink);
    background: var(--field);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 8px 9px;
}

.field input[type="date"],
.field input[type="time"] {
    min-width: 0;
    max-width: 100%;
    appearance: none;
    -webkit-appearance: none;
}

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

.field.compact {
    margin-top: 4px;
}

#dateFilter {
    min-width: 0;
    max-width: 100%;
    inline-size: 100%;
}

#dateFilter::-webkit-date-and-time-value {
    min-width: 0;
    text-align: left;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.setup-menu {
    border: 0;
    background: transparent;
}

.setup-menu summary {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: fit-content;
    min-height: 32px;
    padding: 6px 9px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--muted);
    background: var(--panel-strong);
    font-size: 12px;
    font-weight: 820;
    list-style: none;
    cursor: pointer;
}

.setup-menu summary::-webkit-details-marker {
    display: none;
}

.setup-menu summary svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.setup-menu[open] summary {
    color: #fff;
    border-color: var(--green);
    background: var(--green);
}

.setup-menu .tool-grid {
    padding-top: 7px;
}

.tool-button,
.ghost-button,
.primary-button,
.upload-button {
    min-height: 36px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    padding: 8px 10px;
    background: #fff;
    color: var(--ink);
    font-weight: 760;
    text-align: center;
}

.primary-button {
    border-color: var(--green-dark);
    background: var(--green);
    color: #fff;
}

.primary-button:hover,
.primary-button:focus-visible {
    background: var(--green-dark);
}

.primary-button.full {
    width: 100%;
}

.ghost-button.full {
    width: 100%;
}

.ghost-button {
    min-height: 32px;
    padding: 6px 10px;
    color: var(--green-dark);
}

.mode-label {
    min-height: 18px;
    margin: 0;
    color: var(--blue);
    font-size: 12px;
    font-weight: 750;
}

.entry-tools {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.filter-toggle {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 0;
    min-height: 38px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
    font-size: 13px;
    font-weight: 750;
    overflow: hidden;
}

.filter-choice {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-width: 0;
    min-height: 38px;
    padding: 8px 10px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.filter-toggle input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.filter-dot {
    width: 10px;
    height: 10px;
    flex: 0 0 10px;
    border-radius: 50%;
    background: var(--dot-color, var(--green));
}

.filter-toggle.is-disabled {
    color: var(--muted);
    background: var(--panel-strong);
}

.filter-toggle.is-disabled .filter-dot {
    opacity: 0.25;
}

.filter-choice:focus-within {
    outline: 2px solid var(--green);
    outline-offset: -2px;
}

.count-pill {
    min-width: 30px;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--green);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    text-align: center;
}

.search-results {
    display: grid;
    gap: 7px;
}

.search-status {
    color: var(--muted);
    font-size: 12px;
    font-weight: 760;
}

.search-result {
    display: grid;
    gap: 3px;
    width: 100%;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--result-color, var(--green));
    border-radius: var(--radius);
    background: #fff;
    color: inherit;
    text-align: left;
}

.search-result:hover,
.search-result:focus-visible {
    border-color: var(--green);
}

.search-result strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.search-result span {
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.feature-list {
    display: grid;
    gap: 7px;
    padding-bottom: 12px;
}

.feature-item {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 8px;
    width: 100%;
    min-height: 54px;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: inherit;
    text-align: left;
}

.feature-item.active {
    border-color: var(--green);
    box-shadow: 0 0 0 2px rgba(46, 107, 67, 0.14);
}

.feature-thumb {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background: var(--panel-strong);
    object-fit: cover;
    overflow: hidden;
}

.feature-thumb.placeholder {
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--thumb-color, var(--green));
}

.feature-thumb svg {
    width: 19px;
    height: 19px;
    fill: currentColor;
}

.feature-main {
    min-width: 0;
}

.feature-name,
.feature-meta {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.feature-name {
    display: block;
    font-weight: 820;
}

.feature-meta {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}

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

.map {
    position: absolute;
    inset: 0;
    overflow: hidden;
    overflow: clip;
    background: #d7decf;
    touch-action: none;
    user-select: none;
}

.tile-layer,
.marker-layer,
.map-overlay {
    position: absolute;
    inset: 0;
}

.tile-layer {
    z-index: 0;
    transform: translateZ(0);
    will-change: contents;
}

.map-overlay {
    z-index: 1;
}

.marker-layer {
    z-index: 2;
    pointer-events: none;
}

.tile-layer img {
    position: absolute;
    width: 256px;
    height: 256px;
    max-width: none;
    user-select: none;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.map-overlay {
    pointer-events: auto;
}

.map-shape {
    pointer-events: auto;
    cursor: pointer;
    stroke-linejoin: round;
    stroke-width: 2.5;
}

.draw-line {
    pointer-events: none;
    fill: none;
    stroke: var(--blue);
    stroke-width: 2.5;
    stroke-dasharray: 7 6;
}

.draw-point {
    pointer-events: none;
    fill: var(--blue);
    stroke: #fff;
    stroke-width: 2;
}

.relation-line {
    pointer-events: none;
    fill: none;
    stroke: var(--red);
    stroke-width: 2.5;
    stroke-dasharray: 8 7;
}

.recovery-line {
    stroke: #2f7b72;
    stroke-dasharray: 3 5;
}

.marker {
    position: absolute;
    display: grid;
    place-items: center;
    width: var(--marker-size, 34px);
    height: var(--marker-size, 34px);
    margin: 0;
    border: 2px solid #fff;
    padding: 0;
    border-radius: 50%;
    color: #fff;
    background: var(--marker-color, var(--green));
    box-shadow: 0 3px 9px rgba(16, 25, 19, 0.28);
    z-index: 3;
    line-height: 0;
    pointer-events: auto;
    transform: translate3d(-50%, -50%, 0);
    transition: none;
    contain: layout style;
}

.marker.selected {
    width: var(--marker-size, 34px);
    height: var(--marker-size, 34px);
    margin: 0;
    box-shadow: 0 0 0 3px var(--panel), 0 0 0 5px var(--green-dark), 0 4px 10px rgba(16, 25, 19, 0.26);
    z-index: 4;
}

.marker.is-booked::after {
    content: "";
    position: absolute;
    inset: -5px;
    border: 2px solid #f0b44b;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(240, 180, 75, 0.2);
}

.marker.quick-temp {
    pointer-events: none;
    border-color: #f4c76b;
    box-shadow: 0 0 0 5px rgba(244, 199, 107, 0.24), 0 8px 22px rgba(22, 28, 24, 0.3);
}

.marker svg {
    display: block;
    width: calc(var(--marker-size, 34px) * 0.58);
    height: calc(var(--marker-size, 34px) * 0.58);
    fill: currentColor;
}

.marker.live-location {
    --marker-color: #2368ff;
    border-color: #fff;
    box-shadow: 0 0 0 5px rgba(35, 104, 255, 0.18), 0 0 24px rgba(35, 104, 255, 0.34);
}

.marker.live-location .pictogram-location {
    transform: rotate(var(--live-heading-rotation, 0deg));
    transform-origin: 50% 50%;
    will-change: transform;
}

.map-toolbar {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    max-width: calc(100vw - 32px);
}

.map-toolbar .active {
    border-color: var(--green-dark);
    color: #fff;
    background: var(--green);
}

.map-attribution {
    position: absolute;
    right: 10px;
    bottom: 2px;
    z-index: 4;
    padding: 3px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.88);
    color: #243027;
    font-size: 11px;
    text-decoration: none;
}

.map-panel {
    position: absolute;
    top: 64px;
    right: 16px;
    z-index: 6;
    width: min(360px, calc(100vw - 32px));
    max-height: min(62dvh, 520px);
    overflow: auto;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.map-panel-body {
    display: grid;
    gap: 10px;
}

.area-panel .setup-menu summary {
    width: 100%;
    justify-content: center;
}

.area-panel .setup-menu .tool-grid {
    grid-template-columns: 1fr;
}

.settings-panel h2 {
    margin: 0;
    font-size: 18px;
}

.settings-toggle {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    cursor: pointer;
}

.settings-toggle input {
    width: 20px;
    height: 20px;
    margin: 1px 0 0;
    accent-color: var(--green);
}

.settings-toggle strong,
.settings-toggle small {
    display: block;
}

.settings-toggle small,
.settings-note {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.detail-panel {
    position: fixed;
    top: 18px;
    right: 18px;
    bottom: 18px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: min(420px, calc(100vw - 36px));
    padding: 18px;
    overflow: auto;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.detail-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    justify-content: stretch;
    column-gap: 18px;
}

.detail-header h2 {
    margin-top: 2px;
    font-size: 21px;
}

.detail-meta {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 760;
}

.detail-header > div:not(.detail-actions) {
    min-width: 0;
    align-self: center;
}

.detail-actions {
    align-self: start;
    justify-content: end;
}

.detail-image-button {
    width: 192px;
    height: 192px;
    flex: 0 0 192px;
    overflow: hidden;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--panel-strong);
    box-shadow: 0 3px 12px rgba(31, 37, 33, 0.22);
}

.detail-image-button img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feature-form {
    display: grid;
    gap: 12px;
}

.read-summary {
    display: grid;
    gap: 2px;
}

.map-hover-card {
    position: fixed;
    z-index: 18;
    display: grid;
    grid-template-columns: 184px minmax(0, 1fr);
    gap: 14px;
    width: min(480px, calc(100vw - 24px));
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--panel) 96%, transparent);
    box-shadow: var(--shadow);
    pointer-events: none;
    backdrop-filter: blur(10px);
}

.map-hover-card img {
    width: 184px;
    height: 184px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--panel-strong);
}

.map-hover-card:not(:has(img)) {
    grid-template-columns: 1fr;
}

.map-hover-content {
    display: grid;
    align-content: start;
    gap: 3px;
    min-width: 0;
}

.map-hover-content strong {
    overflow: hidden;
    color: var(--ink);
    font-size: 14px;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.map-hover-content p {
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.summary-row {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
}

.summary-row span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 760;
}

.summary-row strong {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 14px;
    font-weight: 760;
}

.summary-link {
    min-height: 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--green-dark);
    font: inherit;
    font-weight: 850;
    text-align: left;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.summary-link:hover,
.summary-link:focus-visible {
    color: var(--green);
}

.summary-empty {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 720;
}

.booking-panel {
    margin-top: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel-strong);
}

.booking-form {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.booking-form .primary-button {
    grid-column: 1 / -1;
}

.booking-list {
    display: grid;
    gap: 7px;
}

.booking-panel-content {
    padding-top: 8px;
}

.booking-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.booking-item strong,
.booking-item span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.booking-item strong {
    font-size: 13px;
}

.booking-item span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.booking-item .icon-button {
    width: 34px;
    height: 34px;
}

.date-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
}

.position-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.position-fields strong {
    font-size: 14px;
    line-height: 1.35;
}

.position-actions {
    display: flex;
    gap: 8px;
}

.dynamic-fields {
    display: grid;
    gap: 10px;
}

.orientation-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 8px;
}

.orientation-field small {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.compass-button {
    min-height: 39px;
    white-space: nowrap;
}

.wind-panel {
    display: grid;
    gap: 12px;
    margin-top: 10px;
    padding: 13px;
    border: 1px solid color-mix(in srgb, var(--blue) 35%, var(--line));
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--blue) 7%, var(--panel-strong));
}

.wind-header,
.wind-header > div {
    display: flex;
    align-items: center;
}

.wind-header {
    justify-content: space-between;
    gap: 10px;
}

.wind-header > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
}

.wind-header span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.wind-header strong {
    font-size: 16px;
}

.wind-header .icon-button {
    width: 34px;
    height: 34px;
}

.wind-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.wind-target {
    grid-column: 1 / -1;
}

.wind-output {
    display: grid;
    gap: 10px;
}

.wind-recommendation {
    padding: 10px;
    border-left: 4px solid var(--muted);
    border-radius: 6px;
    background: #fff;
}

.wind-recommendation.good {
    border-color: var(--green);
}

.wind-recommendation.fair,
.wind-recommendation.neutral {
    border-color: var(--amber);
}

.wind-recommendation.poor {
    border-color: var(--red);
}

.wind-recommendation strong,
.wind-recommendation p {
    display: block;
    margin: 0;
}

.wind-recommendation p {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.42;
}

.wind-values {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}

.wind-values div {
    min-width: 0;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
}

.wind-values span,
.wind-values strong {
    display: block;
}

.wind-values span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
}

.wind-values strong {
    margin-top: 2px;
    overflow-wrap: anywhere;
    font-size: 13px;
}

.wind-meta,
.wind-note,
.wind-loading,
.wind-error {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}

.wind-error {
    color: var(--red);
    font-weight: 750;
}

.wind-source {
    color: var(--green-dark);
    font-size: 11px;
    font-weight: 750;
}

.distance-card strong {
    font-size: 20px;
}

.image-section {
    display: grid;
    gap: 10px;
}

.upload-button {
    position: relative;
    min-height: 34px;
    padding: 7px 10px;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.image-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.image-card img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: var(--panel-strong);
}

.image-card:not(.pending) img {
    cursor: zoom-in;
}

.image-card:not(.pending) img:focus-visible {
    outline: 3px solid rgba(46, 107, 67, 0.35);
    outline-offset: -3px;
}

.image-card footer {
    display: grid;
    grid-template-columns: 1fr 38px;
    gap: 6px;
    padding: 7px;
}

.image-grid.readonly .image-card footer {
    display: none;
}

.image-card button {
    min-width: 0;
    min-height: 32px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    font-size: 12px;
    font-weight: 780;
}

.image-card .is-title {
    border-color: var(--green);
    color: #fff;
    background: var(--green);
}

.image-card.pending {
    border-style: dashed;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 22px;
    z-index: 20;
    max-width: min(440px, calc(100vw - 32px));
    transform: translateX(-50%);
    padding: 11px 14px;
    border-radius: var(--radius);
    background: #18221d;
    color: #fff;
    box-shadow: var(--shadow);
    font-weight: 760;
}

.image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(13, 18, 15, 0.82);
}

.image-lightbox img {
    display: block;
    max-width: min(100%, 980px);
    max-height: 88dvh;
    border-radius: var(--radius);
    object-fit: contain;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.36);
}

.image-lightbox .icon-button {
    position: absolute;
    top: max(14px, env(safe-area-inset-top));
    right: max(14px, env(safe-area-inset-right));
}

.quick-add-button {
    position: fixed;
    left: 50%;
    bottom: max(18px, env(safe-area-inset-bottom));
    z-index: 13;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    padding: 0;
    transform: translateX(-50%);
    border: 2px solid #fff;
    border-radius: 50%;
    color: #fff;
    background: var(--green);
    box-shadow: 0 12px 34px rgba(31, 37, 33, 0.28);
}

.quick-add-button.active {
    background: var(--red);
}

.quick-add-button svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

.quick-wizard {
    position: fixed;
    left: 50%;
    bottom: max(88px, calc(env(safe-area-inset-bottom) + 82px));
    z-index: 14;
    display: grid;
    gap: 14px;
    width: min(620px, calc(100vw - 32px));
    max-height: min(76dvh, 680px);
    overflow: auto;
    transform: translateX(-50%);
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.quick-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.quick-header h2 {
    margin: 2px 0 0;
    font-size: 20px;
}

.quick-content {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    gap: 9px;
}

.quick-grid.two-up {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quick-grid.scroll {
    display: flex;
    gap: 9px;
    overflow-x: auto;
    padding: 2px 1px 8px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}

.quick-card {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 8px;
    min-height: 96px;
    padding: 12px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--ink);
    background: #fff;
    font-weight: 820;
    text-align: center;
}

.quick-grid.scroll .quick-card {
    width: 124px;
    min-width: 124px;
    scroll-snap-align: start;
}

.quick-card:hover,
.quick-card:focus-visible {
    border-color: var(--green);
    box-shadow: 0 0 0 2px rgba(46, 107, 67, 0.14);
}

.quick-card svg {
    width: 28px;
    height: 28px;
    fill: var(--green);
}

.quick-card img {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    object-fit: cover;
}

.quick-hint {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 680;
}

.quick-form {
    display: grid;
    gap: 10px;
}

.quick-actions {
    display: grid;
}

.quick-back {
    justify-self: start;
}

@media (max-width: 980px) {
    body:has(.detail-panel:not([hidden])) .quick-add-button {
        display: none;
    }

    .app-shell {
        display: block;
        position: relative;
        height: 100dvh;
        width: 100%;
    }

    .desktop-sidebar-toggle {
        display: none;
    }

    .map-stage {
        position: fixed;
        inset: 0;
        min-width: 0;
        min-height: 0;
    }

    .map-toolbar {
        top: max(10px, env(safe-area-inset-top));
        right: max(10px, env(safe-area-inset-right));
        gap: 6px;
    }

    .map-toolbar .icon-button {
        width: 36px;
        height: 36px;
    }

    .map-panel {
        top: calc(max(10px, env(safe-area-inset-top)) + 44px);
        right: max(10px, env(safe-area-inset-right));
        width: min(334px, calc(100vw - 20px));
        max-height: min(56dvh, 440px);
        padding: 10px;
    }

    .sidebar {
        position: fixed;
        left: max(8px, env(safe-area-inset-left));
        right: max(8px, env(safe-area-inset-right));
        bottom: max(8px, env(safe-area-inset-bottom));
        z-index: 9;
        width: auto;
        max-width: calc(100vw - 16px);
        max-height: min(68dvh, 620px);
        padding: 10px;
        gap: 8px;
        border: 1px solid var(--line);
        border-radius: 12px;
        box-shadow: 0 14px 46px rgba(31, 37, 33, 0.24);
        transform: translateY(0);
        transition: transform 180ms ease;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .sidebar.sheet-collapsed {
        transform: translateY(calc(100% - 52px));
    }

    .side-header {
        position: sticky;
        top: 20px;
        z-index: 2;
        min-height: 44px;
        margin: 0 -10px 0;
        padding: 8px 10px 7px;
        background: color-mix(in srgb, var(--panel) 94%, transparent);
        border-bottom: 1px solid rgba(216, 212, 200, 0.75);
        backdrop-filter: blur(10px);
    }

    .side-header .eyebrow {
        display: none;
    }

    .side-header h1 {
        font-size: 17px;
    }

    .sheet-handle {
        position: sticky;
        top: -10px;
        z-index: 3;
        display: grid;
        place-items: center;
        width: 100%;
        height: 24px;
        margin: -10px 0 0;
        padding: 0;
        border: 0;
        background: color-mix(in srgb, var(--panel) 94%, transparent);
        cursor: grab;
        touch-action: none;
    }

    .sheet-handle span {
        width: 42px;
        height: 5px;
        border-radius: 999px;
        background: #a7ada5;
    }

    .area-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    .area-summary div,
    .position-fields,
    .distance-card {
        padding: 8px;
    }

    .area-summary span,
    .position-fields span,
    .distance-card span {
        font-size: 10px;
    }

    .area-summary strong,
    .position-fields strong,
    .distance-card strong {
        font-size: 14px;
    }

    .control-block,
    .feature-section,
    .feature-form,
    .dynamic-fields,
    .image-section {
        gap: 7px;
    }

    .field {
        gap: 4px;
        font-size: 11px;
    }

    .field input,
    .field textarea,
    .field select {
        min-height: 34px;
        min-width: 0;
        padding: 5px 7px;
        font-size: 16px;
    }

    .field textarea {
        min-height: 84px;
    }

    .tool-button,
    .ghost-button,
    .primary-button,
    .upload-button {
        min-height: 34px;
        padding: 7px 8px;
        font-size: 14px;
    }

    .setup-menu summary {
        min-height: 34px;
        padding: 8px 10px;
        font-size: 13px;
    }

    .feature-item {
        grid-template-columns: 34px minmax(0, 1fr);
        min-height: 46px;
        padding: 6px;
    }

    .feature-thumb {
        width: 34px;
        height: 34px;
    }

    .feature-name {
        font-size: 13px;
    }

    .feature-meta {
        margin-top: 2px;
        font-size: 11px;
    }

    .search-result {
        padding: 7px 8px;
    }

    .quick-add-button {
        bottom: max(16px, env(safe-area-inset-bottom));
        width: 56px;
        height: 56px;
    }

    .quick-wizard {
        bottom: calc(max(16px, env(safe-area-inset-bottom)) + 70px);
        width: min(100vw - 20px, 520px);
        max-height: min(68dvh, 560px);
        padding: 12px;
    }

    .quick-header h2 {
        font-size: 18px;
    }

    .quick-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .quick-grid.scroll .quick-card {
        width: 112px;
        min-width: 112px;
    }

    .quick-card {
        min-height: 88px;
        padding: 9px 7px;
        font-size: 12px;
    }

    .quick-card img {
        width: 62px;
        height: 62px;
    }

    .quick-form .field input,
    .quick-form .field select {
        font-size: 16px;
    }

    .map-toolbar {
        top: max(8px, env(safe-area-inset-top));
        right: max(8px, env(safe-area-inset-right));
        gap: 6px;
    }

    .map-toolbar .icon-button,
    .side-actions .icon-button {
        width: 34px;
        height: 34px;
    }

    .map-attribution {
        right: 8px;
        bottom: 2px;
        font-size: 10px;
    }

    .quick-add-button {
        bottom: max(16px, env(safe-area-inset-bottom));
    }

    .quick-wizard {
        right: max(8px, env(safe-area-inset-right));
        bottom: calc(max(8px, env(safe-area-inset-bottom)) + 72px);
        left: max(8px, env(safe-area-inset-left));
        width: auto;
        max-width: calc(100vw - 16px);
        transform: none;
        padding: 12px;
    }

    .quick-grid.scroll {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 4px;
        scroll-snap-type: x proximity;
    }

    .quick-grid.scroll .quick-card {
        min-width: 118px;
        scroll-snap-align: start;
    }

    .detail-panel {
        top: auto;
        right: max(8px, env(safe-area-inset-right));
        bottom: max(8px, env(safe-area-inset-bottom));
        left: max(8px, env(safe-area-inset-left));
        width: auto;
        max-width: calc(100vw - 16px);
        max-height: min(78dvh, 680px);
        padding: 12px;
        gap: 10px;
        border-radius: 12px;
        overflow-x: hidden;
    }

    .detail-header h2 {
        font-size: 18px;
    }

    .detail-header {
        grid-template-columns: auto minmax(0, 1fr);
        column-gap: 12px;
        row-gap: 8px;
    }

    .detail-header > div:not(.detail-actions) {
        grid-column: 2;
        grid-row: 2;
        align-self: start;
        margin-top: 4px;
    }

    .detail-actions {
        grid-column: 2;
        grid-row: 1;
        justify-content: end;
        gap: 6px;
    }

    .summary-row {
        grid-template-columns: 92px minmax(0, 1fr);
        gap: 8px;
        padding: 6px 0;
    }

    .booking-form {
        grid-template-columns: 1fr 1fr;
    }

    .booking-form .field:first-child,
    .booking-form .primary-button {
        grid-column: 1 / -1;
    }

    .detail-image-button {
        grid-row: 1 / span 2;
        width: 164px;
        height: 164px;
        flex-basis: 164px;
    }
}

@media (max-width: 560px) {
    .auth-panel {
        padding: 16px;
    }

    .tool-grid,
    .position-fields,
    .image-grid {
        grid-template-columns: 1fr;
    }

    .date-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .filter-list {
        grid-template-columns: 1fr;
    }

    .position-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

/* Waidblick: ruhiges, mobiles Feldwerkzeug */
:root {
    --bg: #e7ebe5;
    --panel: #f8faf6;
    --panel-strong: #eef2ec;
    --ink: #19211c;
    --muted: #657068;
    --line: #cbd2ca;
    --field: #ffffff;
    --green: #315f42;
    --green-dark: #234831;
    --amber: #ad7727;
    --blue: #386276;
    --red: #aa443d;
    --good: #2f714a;
    --fair: #b47d24;
    --poor: #b64a42;
    --unknown: #737d76;
    --shadow: 0 10px 28px rgba(25, 33, 28, 0.16);
    --shadow-soft: 0 3px 12px rgba(25, 33, 28, 0.13);
    --radius: 12px;
    --radius-small: 9px;
    --control-size: 40px;
}

body {
    font-size: 14px;
    background: var(--bg);
}

button,
input,
select,
textarea {
    border-radius: var(--radius-small);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--green) 48%, transparent);
    outline-offset: 2px;
}

.auth-shell {
    background: var(--bg);
}

.auth-panel,
.sidebar,
.side-header,
.sheet-handle,
.map-hover-card {
    background: var(--panel);
    backdrop-filter: none;
}

.map-hover-card {
    grid-template-columns: 300px minmax(180px, 1fr);
    gap: 12px;
    width: min(560px, calc(100vw - 24px));
    padding: 10px;
    border-radius: var(--radius-small);
    box-shadow: var(--shadow-soft);
}

.map-hover-card img {
    width: 300px;
    height: 225px;
    border-radius: 7px;
    object-fit: contain;
}

.map-hover-card:not(:has(img)) {
    width: min(320px, calc(100vw - 16px));
}

.eyebrow {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

.field input,
.field textarea,
.field select {
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    background: var(--field);
    transition: border-color 120ms ease;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
    border-color: var(--green);
    box-shadow: none;
    background: #fff;
}

.primary-button,
.ghost-button,
.tool-button,
.upload-button,
.icon-button {
    border-radius: var(--radius-small);
    transition: color 100ms ease, background-color 100ms ease, border-color 100ms ease;
}

.primary-button {
    border-color: var(--green-dark);
    background: var(--green);
    box-shadow: none;
}

.quick-card .stroke-icon {
    color: var(--green);
}

.primary-button:hover,
.primary-button:focus-visible {
    transform: none;
    background: var(--green-dark);
    box-shadow: none;
}

.icon-button {
    background: var(--field);
}

.map-stage {
    background: #c8d2c6;
}

.map::after {
    content: none;
}

.tile-layer {
    transform-origin: 50% 50%;
    will-change: transform;
}

.tile-layer img {
    backface-visibility: visible;
    transform: none;
}

.map-toolbar,
.map-view-controls {
    gap: 2px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow-soft);
    backdrop-filter: none;
}

.map-toolbar .icon-button,
.map-view-controls .icon-button {
    width: var(--control-size);
    height: var(--control-size);
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}

.map-toolbar .icon-button:hover,
.map-toolbar .icon-button:focus-visible,
.map-view-controls .icon-button:hover,
.map-view-controls .icon-button:focus-visible {
    color: var(--green-dark);
    background: var(--panel-strong);
}

.map-toolbar .active,
.map-view-controls .active {
    border-color: color-mix(in srgb, var(--green) 24%, var(--line));
    color: var(--green-dark);
    background: #dfe9e0;
}

.map-view-controls {
    position: absolute;
    right: max(12px, env(safe-area-inset-right));
    bottom: calc(max(12px, env(safe-area-inset-bottom)) + 16px);
    z-index: 5;
    display: grid;
    touch-action: manipulation;
}

.map-view-controls .icon-button {
    width: 44px;
    height: 44px;
}

.north-reset-button {
    display: inline-grid;
    place-items: center;
    padding: 0;
}

.icon-button .north-reset-icon {
    width: 24px;
    height: 24px;
    margin: 0;
    fill: none;
}

.north-reset-needle {
    position: relative;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    margin: 0;
    border: 1.5px solid currentColor;
    border-radius: 50%;
    font-size: 9px;
    font-weight: 800;
    line-height: 24px;
}

.north-reset-needle::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 50%;
    width: 5px;
    height: 7px;
    margin: 0;
    border: 0;
    background: currentColor;
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
    transform: translateX(-50%);
}

.map-compass {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    display: grid;
    grid-template-columns: 30px auto;
    grid-template-rows: 1fr 1fr;
    align-items: center;
    gap: 0 7px;
    min-width: 72px;
    padding: 6px 9px 6px 6px;
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    background: var(--panel);
    box-shadow: var(--shadow-soft);
    pointer-events: none;
    backdrop-filter: none;
}

.map-compass-needle {
    grid-row: 1 / -1;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: var(--red);
    background: var(--field);
    box-shadow: inset 0 0 0 1px var(--line);
    font-size: 19px;
    font-weight: 800;
    line-height: 1;
    transform-origin: 50% 50%;
}

.map-compass-needle svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    stroke: none;
}

.map-compass strong {
    align-self: end;
    font-size: 11px;
    line-height: 1;
}

.map-compass small {
    align-self: start;
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
}

.map-panel,
.detail-panel,
.quick-wizard {
    border-color: var(--line);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: none;
}

.map-panel {
    top: 72px;
    display: grid;
    gap: 12px;
    width: min(370px, calc(100vw - 24px));
    padding: 14px;
    border-radius: var(--radius);
}

.map-panel-body {
    gap: 12px;
}

.panel-header,
.map-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 40px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.detail-header:has(> .detail-image-button[hidden]) {
    grid-template-columns: minmax(0, 1fr) auto;
}

.detail-header:has(> .detail-image-button[hidden]) > div:not(.detail-actions) {
    grid-column: 1;
    grid-row: 1;
}

.detail-header:has(> .detail-image-button[hidden]) > .detail-actions {
    grid-column: 2;
    grid-row: 1;
}

.panel-header h2,
.panel-header h3,
.map-panel-header h2,
.map-panel-header h3 {
    margin: 0;
    font-size: 17px;
    line-height: 1.2;
}

.panel-header .icon-button,
.panel-close,
.map-panel-header .icon-button,
.map-panel-close {
    width: 36px;
    height: 36px;
}

.direct-area-tools {
    display: grid;
    gap: 10px;
}

.area-tool-intro {
    display: grid;
    gap: 2px;
}

.area-tool-intro strong {
    font-size: 14px;
}

.area-tool-intro span {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
}

.area-panel .direct-area-tools .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-panel h2 {
    font-size: 17px;
}

.settings-toggle {
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    background: var(--field);
}

.settings-toggle input {
    width: 18px;
    height: 18px;
}

.settings-toggle strong {
    font-size: 13px;
}

.settings-toggle small,
.settings-note {
    font-size: 11px;
    line-height: 1.35;
}

.wind-suitability-field {
    padding-top: 2px;
    transition: opacity 100ms ease;
}

.wind-suitability-field.is-disabled {
    opacity: 0.45;
}

.wind-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 12px;
}

.wind-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.wind-legend i,
.feature-wind-badge::before {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--wind-level-color, var(--muted));
}

.wind-legend i.good,
.feature-wind-badge.good { --wind-level-color: var(--good); }
.wind-legend i.fair,
.feature-wind-badge.fair,
.feature-wind-badge.neutral { --wind-level-color: var(--fair); }
.wind-legend i.poor,
.feature-wind-badge.poor { --wind-level-color: var(--poor); }
.feature-wind-badge.unknown { --wind-level-color: var(--unknown); }

.pictogram-sprite {
    position: fixed;
    width: 0;
    height: 0;
    overflow: hidden;
    pointer-events: none;
}

.pictogram-icon {
    fill: none !important;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.marker .pictogram-icon {
    width: calc(var(--marker-size, 34px) * 0.64);
    height: calc(var(--marker-size, 34px) * 0.64);
}

.marker[data-icon]:not([data-icon="stand"]) {
    border-radius: 30%;
}

.marker[data-icon]:not([data-icon="stand"]).is-booked::after {
    border-radius: 35%;
}

.marker .stroke-icon,
.marker .stroke-icon path,
.stroke-icon,
.stroke-icon path {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pictogram-icon {
    stroke-width: 1.85;
}

.marker.wind-evaluated {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--marker-color) 25%, var(--panel)), 0 3px 9px rgba(16, 25, 19, 0.28);
}

.marker.selected.wind-evaluated {
    box-shadow: 0 0 0 3px var(--panel), 0 0 0 5px var(--green-dark), 0 4px 10px rgba(16, 25, 19, 0.26);
}

.marker.wind-unknown {
    border-style: solid;
    opacity: 0.86;
}

.stand-orientation-indicator {
    position: absolute;
    inset: -2px;
    z-index: 2;
    border-radius: 50%;
    transform-origin: 50% 50%;
    pointer-events: none;
}

.stand-orientation-indicator::before {
    content: none;
}

.stand-orientation-indicator::after {
    content: none;
}

.stand-orientation-indicator svg {
    position: absolute;
    top: -1px;
    left: 50%;
    width: 12px;
    height: 12px;
    overflow: visible;
    fill: #111713;
    stroke: #fff;
    stroke-width: 0.75;
    stroke-linejoin: round;
    transform: translateX(-50%);
}

.feature-wind-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    width: max-content;
    margin-top: 4px;
    padding: 3px 6px;
    border-radius: 7px;
    color: var(--ink);
    background: color-mix(in srgb, var(--wind-level-color) 10%, var(--field));
    font-size: 10px;
    font-weight: 750;
}

.feature-wind-badge::before {
    content: "";
    flex: 0 0 auto;
}

.detail-panel {
    top: 12px;
    right: 12px;
    bottom: 12px;
    width: min(430px, calc(100vw - 24px));
    padding: 16px;
    gap: 12px;
    border-radius: var(--radius);
    opacity: var(--detail-sheet-opacity, 1);
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.detail-sheet-handle {
    display: none;
}

.detail-header {
    grid-template-columns: 56px minmax(0, 1fr) auto;
    column-gap: 12px;
    row-gap: 0;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.detail-header h2 {
    font-size: 19px;
}

.detail-actions {
    gap: 4px;
}

.detail-actions .icon-button {
    width: 36px;
    height: 36px;
}

.detail-image-button {
    width: 56px;
    height: 56px;
    flex-basis: 56px;
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    box-shadow: none;
}

.summary-row {
    grid-template-columns: 108px minmax(0, 1fr);
    padding: 8px 0;
    border-color: var(--line);
}

.summary-row span {
    font-weight: 650;
}

.summary-row strong {
    font-weight: 700;
}

.booking-panel,
.booking-item,
.image-card {
    border-radius: var(--radius-small);
    box-shadow: none;
}

.orientation-field {
    display: grid;
    grid-template-columns: minmax(108px, 0.35fr) minmax(0, 1fr);
    align-items: end;
    gap: 10px;
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    background: var(--panel-strong);
}

.orientation-heading {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.orientation-heading strong,
.orientation-heading small {
    display: block;
}

.orientation-heading > div > strong {
    font-size: 13px;
}

.orientation-heading > div > small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
}

.orientation-preview {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 92px;
    justify-content: flex-end;
}

.orientation-preview > span {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: #fff;
    background: var(--green-dark);
    font-size: 18px;
    transition: transform 80ms linear;
}

.orientation-preview > span svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.orientation-preview > strong {
    font-size: 11px;
    white-space: nowrap;
}

.orientation-number-field {
    min-width: 0;
}

.orientation-range {
    width: 100%;
    margin: 0 0 8px;
    accent-color: var(--green);
}

.orientation-range.is-empty {
    opacity: 0.34;
}

.quick-file-field > span:first-child {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.quick-file-control {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.quick-file-control .ghost-button {
    flex: 0 0 auto;
    min-height: 40px;
}

.quick-file-control > span {
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.orientation-presets {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 4px;
}

.orientation-preset {
    min-height: 30px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--green-dark);
    background: var(--field);
    font-size: 10px;
    font-weight: 750;
}

.orientation-preset:hover {
    border-color: var(--green);
    background: #e5ece5;
}

.orientation-field .compass-button,
.orientation-hint {
    grid-column: 1 / -1;
}

.orientation-hint {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.35;
}

.wind-panel {
    padding: 11px;
    border-color: color-mix(in srgb, var(--blue) 28%, var(--line));
    border-radius: var(--radius-small);
    background: #f1f5f4;
}

.wind-orientation-notice {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    border: 1px solid color-mix(in srgb, var(--amber) 34%, var(--line));
    border-radius: var(--radius-small);
    background: #f7f2e7;
}

.wind-orientation-notice-icon {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    border: 1px solid var(--amber);
    border-radius: 50%;
    color: var(--amber);
    font-size: 10px;
    font-weight: 750;
}

.wind-orientation-notice strong,
.wind-orientation-notice span:not(.wind-orientation-notice-icon) {
    display: block;
}

.wind-orientation-notice strong {
    font-size: 12px;
}

.wind-orientation-notice div > span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.3;
}

.wind-recommendation {
    padding: 9px 10px;
    border-width: 1px;
    border-left-width: 4px;
    border-radius: var(--radius-small);
    box-shadow: none;
}

.wind-recommendation-top,
.wind-overview-current {
    display: flex;
    align-items: center;
    gap: 11px;
}

.wind-direction-arrow {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    overflow: visible;
    border: 1px solid color-mix(in srgb, var(--blue) 34%, var(--line));
    border-radius: 50%;
    color: var(--blue);
    background: #eef3f4;
    box-shadow: none;
    font-size: 0;
    line-height: 1;
    transform: none;
}

.wind-direction-arrow > svg {
    width: 22px;
    height: 22px;
    overflow: visible;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transform: rotate(var(--wind-arrow-rotation, 0deg));
    transform-origin: 50% 50%;
}

.wind-direction-arrow.compact {
    width: 28px;
    height: 28px;
    box-shadow: none;
}

.wind-direction-arrow.compact > svg {
    width: 18px;
    height: 18px;
}

.wind-timeline-section {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.wind-timeline-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.wind-timeline-heading strong {
    font-size: 11px;
}

.wind-timeline-heading span {
    color: var(--muted);
    font-size: 9px;
    font-weight: 650;
}

.wind-timeline {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    padding: 1px 1px 5px;
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
}

.wind-hour {
    --hour-color: var(--unknown);
    display: grid;
    justify-items: center;
    gap: 3px;
    min-width: 72px;
    padding: 7px 6px;
    border: 1px solid color-mix(in srgb, var(--hour-color) 42%, var(--line));
    border-top: 3px solid var(--hour-color);
    border-radius: var(--radius-small);
    background: var(--field);
    scroll-snap-align: start;
}

.wind-hour.good { --hour-color: var(--good); }
.wind-hour.fair,
.wind-hour.neutral { --hour-color: var(--fair); }
.wind-hour.poor { --hour-color: var(--poor); }

.wind-hour > strong {
    font-size: 10px;
}

.wind-hour > span:not(.wind-direction-arrow),
.wind-hour > small {
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    white-space: nowrap;
}

.wind-overview {
    position: absolute;
    bottom: 12px;
    left: 12px;
    z-index: 8;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 10px;
    width: min(400px, calc(100vw - 76px));
    max-height: min(58dvh, 500px);
    overflow: hidden;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: none;
    overscroll-behavior: contain;
    touch-action: pan-x pan-y;
}

.wind-overview > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 36px;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--line);
}

.wind-overview-actions {
    display: flex;
    align-items: center;
    gap: 3px;
}

.wind-overview > header strong,
.wind-overview-current strong,
.wind-overview-current span {
    display: block;
}

.wind-overview > header strong {
    margin-top: 1px;
    font-size: 15px;
}

.wind-overview-refresh,
.wind-overview-close {
    width: 34px;
    height: 34px;
}

.wind-overview-current {
    padding: 8px;
    border: 1px solid var(--line);
    border-left-width: 4px;
    border-radius: var(--radius-small);
    background: var(--field);
}

.wind-overview-current.good {
    border-left-color: var(--good);
}

.wind-overview-current.fair,
.wind-overview-current.neutral {
    border-left-color: var(--fair);
}

.wind-overview-current.poor {
    border-left-color: var(--poor);
}

.wind-overview-current > div {
    min-width: 0;
}

.wind-overview-current span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 650;
}

.wind-overview-verdict {
    display: inline-block;
    margin-top: 3px;
    color: var(--ink);
    font-size: 10px;
    font-weight: 750;
}

.wind-overview-meta,
.wind-overview-empty {
    margin: 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.35;
}

.wind-filter-pills {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    min-width: 0;
    max-width: 100%;
    min-height: 35px;
    padding: 1px 2px 4px;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
}

.wind-filter-pills button {
    min-height: 30px;
    padding: 5px 9px;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--ink);
    background: #fff;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.wind-filter-pills button.active {
    border-color: var(--green);
    color: #fff;
    background: var(--green);
}

.map-attribution {
    border: 1px solid rgba(75, 84, 77, 0.2);
    border-radius: 5px;
    background: rgba(248, 250, 246, 0.9);
    backdrop-filter: none;
}

.quick-add-button {
    width: 54px;
    height: 54px;
    border: 2px solid var(--panel);
    background: var(--green);
    box-shadow: 0 5px 16px rgba(23, 42, 29, 0.25);
}

.quick-wizard {
    gap: 12px;
    padding: 14px;
    border-radius: var(--radius);
}

.quick-header {
    align-items: center;
    min-height: 40px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.quick-header h2 {
    margin-top: 1px;
    font-size: 18px;
}

.quick-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.quick-header-title {
    flex: 1 1 auto;
    min-width: 0;
}

.quick-header-back,
.quick-back-button,
#quickBackBtn {
    width: 36px;
    height: 36px;
}

.quick-card {
    min-height: 88px;
    border-radius: var(--radius-small);
    box-shadow: none;
}

.quick-card:hover,
.quick-card:focus-visible {
    border-color: var(--green);
    background: #edf2ed;
    box-shadow: none;
}

.quick-hint {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.35;
}

@media (max-width: 980px) {
    html,
    body,
    .app-shell,
    .map-stage {
        width: 100%;
        height: 100dvh;
        overscroll-behavior: none;
    }

    .map-toolbar {
        top: max(6px, env(safe-area-inset-top));
        right: max(6px, env(safe-area-inset-right));
        max-width: calc(100vw - 12px);
        flex-wrap: nowrap;
        gap: 1px;
        padding: 3px;
        border-radius: 10px;
    }

    .map-toolbar .icon-button {
        width: 38px;
        height: 38px;
        border-radius: 7px;
    }

    .map-attribution {
        right: auto;
        bottom: 2px;
        left: 2px;
    }

    .app-shell.navigation-minimal .map-stage {
        position: fixed;
        inset: 0;
        width: auto;
        height: auto;
        min-height: 0;
    }

    .map-panel {
        top: calc(max(6px, env(safe-area-inset-top)) + 50px);
        right: max(8px, env(safe-area-inset-right));
        left: max(8px, env(safe-area-inset-left));
        width: auto;
        max-width: 370px;
        max-height: min(66dvh, 520px);
        margin-inline: auto;
        padding: 12px;
        border-radius: var(--radius);
    }

    .map-compass {
        top: calc(max(6px, env(safe-area-inset-top)) + 48px);
        left: max(6px, env(safe-area-inset-left));
        min-width: 70px;
        padding: 5px 8px 5px 5px;
    }

    .wind-overview {
        right: max(8px, env(safe-area-inset-right));
        bottom: calc(max(8px, env(safe-area-inset-bottom)) + 64px);
        left: max(8px, env(safe-area-inset-left));
        width: auto;
        max-width: 420px;
        max-height: min(56dvh, 460px);
        margin-inline: auto;
        padding: 11px;
        border-radius: var(--radius);
    }

    body:has(.detail-panel:not([hidden])) .wind-overview,
    body:has(.quick-wizard:not([hidden])) .wind-overview {
        display: none;
    }

    .detail-panel {
        --detail-inline-gap: max(8px, env(safe-area-inset-left), env(safe-area-inset-right));
        top: auto;
        right: var(--detail-inline-gap);
        bottom: max(8px, env(safe-area-inset-bottom));
        left: var(--detail-inline-gap);
        width: auto;
        max-width: 460px;
        max-height: min(84dvh, 720px);
        margin-inline: auto;
        padding: 14px;
        border-radius: var(--radius);
        transform: translateY(var(--detail-sheet-translate, 0px));
        transition: transform 170ms ease, opacity 150ms ease;
        will-change: transform;
        overscroll-behavior: contain;
    }

    .detail-panel.is-dragging {
        transition: none;
        user-select: none;
    }

    .detail-panel.is-closing {
        pointer-events: none;
    }

    .detail-sheet-handle {
        position: sticky;
        top: -14px;
        z-index: 4;
        display: grid;
        place-items: center;
        width: calc(100% + 28px);
        min-height: 26px;
        margin: -14px -14px -6px;
        padding: 0;
        border: 0;
        border-radius: var(--radius) var(--radius) 0 0;
        background: var(--panel);
        touch-action: none;
        cursor: grab;
    }

    .detail-sheet-handle span {
        width: 38px;
        height: 4px;
        border-radius: 999px;
        background: #9da69f;
    }

    .detail-header {
        grid-template-columns: 48px minmax(0, 1fr) auto;
        column-gap: 10px;
        row-gap: 0;
    }

    .detail-header > div:not(.detail-actions) {
        grid-column: auto;
        grid-row: auto;
        align-self: center;
        margin-top: 0;
    }

    .detail-actions {
        grid-column: 3;
        grid-row: 1;
        align-self: center;
    }

    .detail-image-button {
        grid-row: auto;
        width: 48px;
        height: 48px;
        flex-basis: 48px;
        border-radius: 8px;
    }

    .orientation-field {
        grid-template-columns: 96px minmax(0, 1fr);
        gap: 10px;
        padding: 10px;
    }

    .orientation-presets {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .wind-values {
        gap: 5px;
    }

    .wind-values div {
        padding: 7px 5px;
    }

    .quick-add-button {
        bottom: max(12px, env(safe-area-inset-bottom));
    }

    .quick-wizard {
        right: max(8px, env(safe-area-inset-right));
        bottom: calc(max(8px, env(safe-area-inset-bottom)) + 66px);
        left: max(8px, env(safe-area-inset-left));
        width: auto;
        max-width: 520px;
        max-height: min(72dvh, 620px);
        margin-inline: auto;
        transform: none;
    }
}

@media (max-width: 560px) {
    .map-toolbar {
        max-width: calc(100vw - 12px);
    }

    .map-toolbar .icon-button {
        width: 36px;
        height: 36px;
    }

    .map-compass {
        transform: none;
    }

    .detail-panel {
        max-height: min(84dvh, 720px);
    }

    .detail-actions .icon-button {
        width: 34px;
        height: 34px;
    }

    .detail-header h2 {
        font-size: 17px;
    }

    .area-panel .direct-area-tools .tool-grid {
        grid-template-columns: 1fr;
    }

    .orientation-field {
        grid-template-columns: 1fr;
    }

    .orientation-heading,
    .orientation-number-field,
    .orientation-range,
    .orientation-presets,
    .orientation-field .compass-button,
    .orientation-hint {
        grid-column: 1;
    }

    .orientation-range {
        margin-bottom: 3px;
    }

    .wind-overview > header strong {
        font-size: 14px;
    }

    .wind-timeline-heading span {
        display: none;
    }

    .quick-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
    }

    .quick-card {
        min-height: 82px;
        padding: 8px 5px;
    }
}

/* Zusatzmodule */
.ios-install-hint {
    display: grid;
    gap: 3px;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    background: var(--panel-strong);
}

.ios-install-hint strong {
    font-size: 12px;
}

.ios-install-hint span {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
}

.wind-disclosure {
    display: block;
    padding: 0;
    overflow: hidden;
}

.wind-disclosure-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 14px;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 9px 10px;
    cursor: pointer;
    list-style: none;
}

.wind-disclosure-summary::-webkit-details-marker {
    display: none;
}

.wind-disclosure-summary > div,
.wind-disclosure-summary > div > span,
.wind-disclosure-summary > div > strong {
    display: block;
}

.wind-disclosure-summary > div > span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 650;
    letter-spacing: 0;
    text-transform: none;
}

.wind-disclosure-summary > div > strong {
    margin-top: 1px;
    font-size: 13px;
}

.wind-disclosure-summary > small {
    color: var(--blue);
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.wind-disclosure-chevron {
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--blue);
    border-bottom: 2px solid var(--blue);
    transform: translateY(-2px) rotate(45deg);
    transition: transform 120ms ease;
}

.wind-disclosure[open] .wind-disclosure-chevron {
    transform: translateY(2px) rotate(225deg);
}

.wind-panel-content {
    display: grid;
    gap: 10px;
    padding: 0 10px 10px;
    border-top: 1px solid var(--line);
}

.wind-panel-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 8px;
}

.wind-panel-toolbar > span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 650;
}

.wind-panel-toolbar .icon-button {
    width: 34px;
    height: 34px;
}

.wind-planning-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 8px;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    background: var(--panel-strong);
}

.wind-planning-status span,
.wind-planning-status strong {
    display: block;
}

.wind-planning-status span {
    color: var(--muted);
    font-size: 9px;
    font-weight: 650;
    letter-spacing: 0;
    text-transform: none;
}

.wind-planning-status strong {
    margin-top: 2px;
    font-size: 13px;
}

.wind-planning-presets {
    display: flex;
    gap: 4px;
}

.wind-planning-presets .ghost-button {
    min-height: 34px;
    padding: 5px 8px;
    font-size: 10px;
    white-space: nowrap;
}

.wind-planning-presets .active {
    border-color: var(--green);
    color: #fff;
    background: var(--green);
}

.wind-overview-target {
    grid-column: 1 / -1;
    min-width: 0;
    font-size: 10px;
}

.wind-overview-stand {
    grid-column: 1 / -1;
    font-size: 10px;
}

.wind-overview-target input,
.wind-overview-stand select {
    min-height: 38px;
    background: var(--field);
}

.wind-overview-target input[type="datetime-local"] {
    width: min(100%, 230px);
    min-width: 0;
    max-width: 100%;
    min-height: 34px;
    padding: 5px 7px;
    font-size: 12px;
    appearance: none;
    -webkit-appearance: none;
}

.wind-overview-target input[type="datetime-local"]::-webkit-date-and-time-value {
    min-width: 0;
    text-align: left;
}

.wind-overview-body {
    display: grid;
    gap: 8px;
    min-height: 0;
    min-width: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0 4px 12px 0;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
}

@media (max-width: 420px) {
    .wind-planning-controls {
        grid-template-columns: 1fr;
    }

    .wind-planning-presets,
    .wind-overview-stand,
    .wind-overview-target {
        grid-column: 1;
    }

    .wind-planning-presets .ghost-button {
        flex: 1;
    }

    .wind-filter-pills {
        flex-wrap: wrap;
        overflow: visible;
        min-height: auto;
        padding-bottom: 6px;
        touch-action: pan-y;
    }
}

/* iOS reports 100dvh without the safe-area height in installed web apps. */
@media (max-width: 980px) and (display-mode: standalone) {
    html,
    body,
    .app-shell {
        height: 100vh;
        min-height: 100vh;
    }

    .app-shell.navigation-minimal .map-stage {
        position: absolute;
        inset: 0;
        width: auto;
        height: auto;
        min-height: 0;
    }
}

.feature-link-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.feature-link-actions > .ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    padding: 7px 10px;
    border: 1px solid var(--line);
    background: var(--field);
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.feature-link-actions > .ghost-button:hover {
    border-color: var(--green);
    color: var(--green-dark);
}

.feature-link-actions svg {
    width: 16px;
    height: 16px;
    flex: none;
    fill: currentColor;
}

.clipboard-copy-input {
    position: fixed;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    padding: 0;
    opacity: 0;
    pointer-events: none;
}

.area-vertex-layer {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}

.area-vertex,
.area-midpoint {
    position: absolute;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    isolation: isolate;
    transform: translate(-50%, -50%);
    pointer-events: auto;
    touch-action: none;
    cursor: grab;
}

.area-vertex::before,
.area-midpoint::before {
    position: absolute;
    inset: 9px;
    z-index: -1;
    content: '';
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 1px 5px #0003;
}

.area-vertex[aria-pressed="true"] {
    z-index: 2;
}

.area-vertex[aria-pressed="true"]::before {
    inset: 6px;
    background: var(--green-dark);
    box-shadow: 0 0 0 2px var(--green), 0 1px 5px #0003;
}

.area-midpoint {
    width: 36px;
    height: 36px;
    color: var(--green-dark);
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
}

.area-midpoint::before {
    inset: 7px;
    border: 1px solid var(--green);
    background: #fff;
}

.area-midpoint svg {
    display: block;
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.area-edit-shape {
    fill: #2f654527;
    stroke: var(--green);
    stroke-width: 3;
    stroke-dasharray: none;
}

.map.is-area-editing .marker-layer .marker {
    pointer-events: none;
}

.area-edit-toolbar {
    position: absolute;
    bottom: max(24px, calc(env(safe-area-inset-bottom) + 12px));
    left: 50%;
    z-index: 6;
    width: min(450px, calc(100% - 24px));
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow-soft);
    transform: translateX(-50%);
    touch-action: manipulation;
}

.area-edit-status {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
}

.area-edit-status span {
    color: var(--muted);
    font-size: 12px;
}

.area-edit-actions {
    display: grid;
    grid-template-columns: 36px repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.area-edit-actions > button {
    min-width: 0;
    min-height: 38px;
    padding: 6px;
    font-size: 13px;
    line-height: 1.2;
}

.area-edit-actions > .icon-button {
    width: 36px;
    height: 38px;
}

body:has(#areaEditToolbar:not([hidden])) .map-view-controls {
    display: none;
}

@media (max-width: 379px) {
    .area-edit-actions > button {
        font-size: 12px;
    }

    .area-edit-status {
        flex-wrap: wrap;
        gap: 2px 8px;
    }
}

/* Nachsuchen und Arbeiten */
.panel-header-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    min-width: 0;
}

.panel-header-actions .primary-button {
    min-height: 34px;
    padding: 6px 10px;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 750;
    white-space: nowrap;
}

.operations-panel {
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 0;
    max-height: min(76dvh, 680px);
    overflow: hidden;
}

.operations-panel .map-panel-header {
    min-width: 0;
}

.operations-panel .map-panel-header h2 {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.operations-panel-body {
    align-content: start;
    min-width: 0;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0 3px 4px 0;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

.operations-toolbar {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding: 0 0 8px;
    background: var(--panel);
}

.operations-toolbar > :first-child {
    flex: 1 1 auto;
    min-width: 0;
}

.operations-toolbar > select {
    flex: 0 1 132px;
    width: auto;
    min-width: 0;
    max-width: 42%;
    min-height: 36px;
    padding: 6px 24px 6px 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    color: var(--ink);
    background-color: var(--field);
    font-size: 10px;
    font-weight: 700;
}

.segmented-control {
    display: flex;
    align-items: stretch;
    gap: 2px;
    min-width: 0;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    background: var(--panel-strong);
}

.segmented-control button,
.segmented-control .segment {
    flex: 1 1 0;
    min-width: 0;
    min-height: 30px;
    overflow: hidden;
    padding: 5px 8px;
    border: 0;
    border-radius: 6px;
    color: var(--muted);
    background: transparent;
    font-size: 10px;
    font-weight: 750;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.segmented-control button.active,
.segmented-control button[aria-pressed="true"],
.segmented-control .segment.active,
.segmented-control .segment[aria-selected="true"] {
    color: var(--green-dark);
    background: var(--field);
    box-shadow: 0 0 0 1px var(--line);
}

.tracking-list,
.task-list {
    display: grid;
    align-content: start;
    gap: 8px;
    min-width: 0;
}

.tracking-card,
.task-card {
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    color: var(--ink);
    background: var(--field);
    box-shadow: none;
}

.tracking-card {
    display: grid;
    gap: 8px;
    border-left: 3px solid var(--tracking-accent, var(--green));
}

button.tracking-card,
button.task-card {
    width: 100%;
    font: inherit;
    text-align: left;
}

.tracking-card:hover,
.tracking-card:focus-visible,
.task-card:hover,
.task-card:focus-visible {
    border-color: var(--green);
}

.tracking-card.active,
.tracking-card[aria-current="true"] {
    border-color: var(--green);
    background: color-mix(in srgb, var(--green) 6%, var(--field));
}

.tracking-card > header,
.tracking-card > .tracking-card-main,
.tracking-card > div:first-child {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.tracking-card > div:first-child > strong {
    min-width: 0;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tracking-card-title {
    min-width: 0;
    overflow: hidden;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tracking-card h3,
.tracking-card h4,
.task-card h3,
.task-card h4,
.linked-work-panel h3 {
    margin: 0;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.3;
    text-overflow: ellipsis;
}

.tracking-status,
.tracking-card-status,
.task-priority {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    min-height: 20px;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.tracking-status,
.tracking-card-status {
    color: var(--green-dark);
    background: color-mix(in srgb, var(--green) 13%, var(--field));
}

.tracking-status.is-active,
.tracking-status[data-status="active"],
.tracking-card-status.active {
    color: var(--green-dark);
    background: color-mix(in srgb, var(--green) 13%, var(--field));
}

.tracking-status.completed,
.tracking-status.is-completed,
.tracking-status[data-status="completed"],
.tracking-card-status.completed {
    color: var(--muted);
    background: var(--panel-strong);
}

.tracking-status.handed-over,
.tracking-status[data-status="handed_over"] {
    color: #755117;
    background: color-mix(in srgb, var(--amber) 15%, var(--field));
}

.tracking-meta,
.tracking-card-meta,
.task-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3px 7px;
    min-width: 0;
    color: var(--muted);
    font-size: 10px;
    font-weight: 650;
    line-height: 1.35;
}

.tracking-meta > span,
.tracking-card-meta > span,
.task-meta > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tracking-card-meta {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tracking-actions,
.task-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 5px;
}

.tracking-actions button,
.task-actions button {
    min-height: 32px;
    padding: 5px 9px;
    font-size: 10px;
}

.tracking-timeline {
    position: relative;
    display: grid;
    gap: 0;
    min-width: 0;
    padding: 2px 0;
}

.tracking-timeline::before {
    content: "";
    position: absolute;
    top: 38px;
    bottom: 19px;
    left: 13px;
    width: 1px;
    background: var(--line);
}

.tracking-timeline-item {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px;
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 5px 0;
    border: 0;
    color: var(--ink);
    background: transparent;
    text-align: left;
}

.tracking-timeline-item > .icon-button {
    width: 30px;
    height: 30px;
    margin-top: 1px;
    border-radius: 7px;
}

.tracking-timeline-item > .icon-button svg {
    width: 16px;
    height: 16px;
}

button.tracking-timeline-item:hover .tracking-sign-meta strong,
button.tracking-timeline-item:focus-visible .tracking-sign-meta strong {
    color: var(--green-dark);
}

.tracking-sequence {
    display: grid;
    place-items: center;
    width: 27px;
    height: 27px;
    border: 2px solid var(--panel);
    border-radius: 50%;
    color: #fff;
    background: var(--tracking-accent, var(--red));
    box-shadow: 0 0 0 1px var(--line);
    font-size: 10px;
    font-weight: 850;
    line-height: 1;
    margin-top: 1px;
}

.tracking-sign-meta {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.tracking-sign-meta strong,
.tracking-sign-meta span,
.tracking-sign-meta small {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tracking-sign-meta p {
    margin: 2px 0 0;
    overflow-wrap: anywhere;
    color: var(--ink);
    font-size: 11px;
    font-weight: 550;
    line-height: 1.4;
    white-space: normal;
}

.tracking-sign-meta strong {
    font-size: 12px;
}

.tracking-sign-meta span,
.tracking-sign-meta small {
    color: var(--muted);
    font-size: 9px;
    font-weight: 650;
}

.tracking-photo-strip {
    display: flex;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
    margin-top: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1px 1px 4px;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
}

.tracking-photo {
    position: relative;
    flex: 0 0 56px;
    width: 56px;
    height: 44px;
}

.tracking-photo-thumb {
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--panel-strong);
}

.tracking-photo-thumb:hover,
.tracking-photo-thumb:focus-visible {
    border-color: var(--green);
    outline: none;
}

.tracking-photo-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tracking-photo-remove {
    position: absolute;
    top: -4px;
    right: -4px;
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 2px solid var(--panel);
    border-radius: 50%;
    color: #fff;
    background: var(--red);
    box-shadow: 0 1px 4px rgba(28, 37, 32, 0.2);
}

.tracking-photo-remove svg {
    width: 11px;
    height: 11px;
    fill: currentColor;
}

.tracking-photo-add {
    display: grid;
    grid-template-columns: 18px auto;
    place-items: center;
    align-content: center;
    gap: 4px;
    flex: 0 0 auto;
    min-width: 64px;
    height: 44px;
    padding: 5px 8px;
    border: 1px dashed color-mix(in srgb, var(--green) 55%, var(--line));
    border-radius: 7px;
    color: var(--green-dark);
    background: color-mix(in srgb, var(--green) 5%, var(--field));
    font-size: 9px;
    font-weight: 800;
}

.tracking-photo-add:hover,
.tracking-photo-add:focus-visible {
    border-style: solid;
    background: color-mix(in srgb, var(--green) 10%, var(--field));
    outline: none;
}

.tracking-photo-add svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
}

.tracking-sign-meta .tracking-photo-add span {
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
}

.tracking-route,
.tracking-origin-line {
    pointer-events: none;
    fill: none;
    vector-effect: non-scaling-stroke;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tracking-route {
    stroke: color-mix(in srgb, var(--red) 82%, #5f332e);
    stroke-width: 3;
}

.tracking-route.completed,
.tracking-route.is-completed,
.tracking-route[data-status="completed"] {
    opacity: 0.48;
    stroke-width: 2.25;
}

.tracking-origin-line {
    opacity: 0.72;
    stroke: var(--green-dark);
    stroke-width: 2;
    stroke-dasharray: 5 6;
}

.marker.tracking-sign-marker {
    --marker-color: #87483f;
    border-width: 2px;
}

.tracking-sign-marker > span {
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 10px;
    font-weight: 850;
    line-height: 1;
}

.task-card {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    align-items: start;
    gap: 9px;
    border-left-width: 3px;
}

.task-card.priority-high {
    border-left-color: var(--red);
}

.task-card.priority-normal {
    border-left-color: var(--amber);
}

.task-card.priority-low {
    border-left-color: var(--blue);
}

.task-status-button {
    position: relative;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    margin-top: 1px;
    padding: 0;
    border: 1.5px solid color-mix(in srgb, var(--muted) 60%, var(--line));
    border-radius: 50%;
    color: #fff;
    background: var(--field);
}

.task-status-button:hover,
.task-status-button:focus-visible {
    border-color: var(--green);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 12%, transparent);
}

.task-status-button > span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: transparent;
}

.task-card.is-done .task-status-button {
    border-color: var(--green);
    background: var(--green);
}

.task-card.is-done .task-status-button > svg {
    display: none;
}

.task-card.is-done .task-status-button::after {
    content: "";
    width: 8px;
    height: 4px;
    margin-top: -2px;
    border-bottom: 2px solid currentColor;
    border-left: 2px solid currentColor;
    transform: rotate(-45deg);
}

.task-card.is-complete,
.task-card.is-done,
.task-card[data-status="done"],
.task-card[data-status="completed"] {
    background: var(--panel-strong);
}

.task-card-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 3px;
    width: 100%;
    min-width: 0;
    min-height: 24px;
    padding: 0;
    border: 0;
    color: inherit;
    background: transparent;
    font: inherit;
    text-align: left;
}

.task-card-body {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.task-card-main > div,
.task-card-main > button {
    min-width: 0;
}

.task-card-main strong,
.task-card-main span {
    display: block;
    min-width: 0;
}

.task-card-main strong {
    overflow: hidden;
    font-size: 13px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-card-main > .task-meta {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-card-main > p,
.task-card-main > .task-card-description {
    display: -webkit-box;
    margin: 2px 0 1px;
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    font-weight: 550;
    line-height: 1.4;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.operations-error {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    color: var(--muted);
    background: var(--panel-strong);
    font-size: 11px;
    font-weight: 650;
}

.operations-error .ghost-button {
    justify-self: start;
}

.task-card.is-done .task-card-main > strong {
    color: var(--muted);
    text-decoration: line-through;
    text-decoration-thickness: 1px;
}

.task-feature-link {
    display: block;
    justify-self: start;
    max-width: 100%;
    min-height: 0;
    margin-top: 3px;
    overflow: hidden;
    padding: 4px 7px;
    border: 0;
    border-radius: 6px;
    color: var(--green-dark);
    background: var(--panel-strong);
    font-size: 10px;
    font-weight: 750;
    line-height: 1.25;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-feature-link:hover,
.task-feature-link:focus-visible {
    color: #fff;
    background: var(--green);
}

.task-priority {
    color: var(--muted);
    background: var(--panel-strong);
}

.task-priority.low,
.task-priority[data-priority="low"] {
    color: var(--blue);
    background: color-mix(in srgb, var(--blue) 10%, var(--field));
}

.task-priority.high,
.task-priority[data-priority="high"] {
    color: #755117;
    background: color-mix(in srgb, var(--amber) 16%, var(--field));
}

.task-priority.urgent,
.task-priority[data-priority="urgent"] {
    color: var(--red);
    background: color-mix(in srgb, var(--red) 12%, var(--field));
}

.task-form {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.task-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    min-width: 0;
}

.task-grid > .full,
.task-grid > [data-span="full"] {
    grid-column: 1 / -1;
}

.task-feature-picker {
    min-width: 0;
}

.task-feature-search-wrap {
    position: relative;
    min-width: 0;
}

.task-feature-search-wrap input {
    padding-left: 38px;
}

.task-feature-search-icon {
    position: absolute;
    top: 50%;
    left: 11px;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    color: var(--muted);
    transform: translateY(-50%);
    pointer-events: none;
}

.task-feature-search-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.task-feature-selected {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 30px;
    align-items: center;
    gap: 7px;
    min-width: 0;
    min-height: 40px;
    padding: 5px 5px 5px 10px;
    border: 1px solid color-mix(in srgb, var(--green) 42%, var(--line));
    border-radius: var(--radius-small);
    color: var(--green-dark);
    background: color-mix(in srgb, var(--green) 7%, var(--field));
}

.task-feature-selected > span {
    min-width: 0;
    overflow: hidden;
    font-size: 11px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-feature-clear {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    color: var(--muted);
    background: transparent;
}

.task-feature-clear:hover,
.task-feature-clear:focus-visible {
    color: var(--red);
    background: var(--panel-strong);
}

.task-feature-clear svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.task-feature-results {
    display: grid;
    gap: 3px;
    max-height: min(220px, 32dvh);
    min-width: 0;
    overflow-y: auto;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    background: var(--field);
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.task-feature-option {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    width: 100%;
    min-height: 44px;
    padding: 5px 7px;
    border: 0;
    border-radius: 7px;
    color: var(--ink);
    background: transparent;
    text-align: left;
}

.task-feature-option:hover,
.task-feature-option:focus-visible,
.task-feature-option[aria-selected="true"] {
    outline: none;
    background: var(--panel-strong);
}

.task-feature-option[aria-selected="true"] {
    box-shadow: inset 3px 0 0 var(--green);
}

.task-feature-option-icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: #fff;
    background: var(--feature-color);
}

.task-feature-option-icon svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
}

.task-feature-option-icon .stroke-icon {
    fill: none;
    stroke: currentColor;
}

.task-feature-option > span:last-child,
.task-feature-option strong,
.task-feature-option small {
    display: block;
    min-width: 0;
}

.task-feature-option strong {
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-feature-option small {
    margin-top: 1px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
}

.task-feature-empty {
    margin: 0;
    padding: 12px 9px;
    color: var(--muted);
    font-size: 11px;
    text-align: center;
}

.linked-work-panel {
    display: grid;
    gap: 8px;
    margin-top: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    background: var(--panel-strong);
}

.linked-work-panel > header,
.linked-work-panel > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 28px;
}

.linked-work-panel > summary {
    list-style: none;
    cursor: pointer;
}

.linked-work-panel > summary::-webkit-details-marker {
    display: none;
}

.linked-work-list {
    display: grid;
    gap: 5px;
}

.linked-work-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-width: 0;
    min-height: 36px;
    padding: 6px 7px;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--ink);
    background: var(--field);
}

button.linked-work-item {
    width: 100%;
    font: inherit;
    text-align: left;
}

.linked-work-item > span,
.linked-work-item > strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.linked-work-item > span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 650;
}

.marker-work-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    z-index: 2;
    display: grid;
    place-items: center;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border: 2px solid var(--panel);
    border-radius: 999px;
    color: #fff;
    background: var(--amber);
    font-size: 8px;
    font-weight: 850;
    line-height: 1;
    pointer-events: none;
}

.quick-grid.sign-types {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.quick-grid.sign-types .quick-card {
    min-height: 78px;
    padding: 8px 6px;
    gap: 6px;
    font-size: 11px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.quick-grid.sign-types .quick-card svg {
    width: 25px;
    height: 25px;
}

.quick-grid.main-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quick-grid.main-actions .quick-card {
    min-height: 86px;
}

.filter-only {
    display: none !important;
}

.filter-choice > span:not(.filter-dot) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.filters-panel .filter-only {
    position: relative;
    z-index: 2;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin-left: 0;
    padding: 4px 7px;
    border: 0;
    border-radius: 5px;
    color: var(--muted);
    background: transparent;
    font-size: 11px;
    font-weight: 750;
    white-space: nowrap;
}

.filters-panel .filter-only:hover,
.filters-panel .filter-only:focus-visible {
    color: var(--green-dark);
    background: var(--panel-strong);
}

.operations-panel .filter-only.is-visible {
    display: flex !important;
}

.filters-panel {
    grid-template-rows: auto minmax(0, 1fr);
    width: min(440px, calc(100vw - 24px));
    max-width: 440px;
    max-height: calc(100dvh - max(6px, env(safe-area-inset-top)) - max(12px, env(safe-area-inset-bottom)) - 136px);
    overflow: hidden;
}

.filters-panel-body {
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 2px;
    overscroll-behavior: contain;
    touch-action: pan-y;
}

.filters-panel .filter-choice {
    min-height: 44px;
    padding-inline: 8px;
    gap: 6px;
}

.filters-panel .filter-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 980px) {
    .filters-panel {
        width: auto;
    }

    .operations-panel {
        max-height: calc(100dvh - max(6px, env(safe-area-inset-top)) - max(12px, env(safe-area-inset-bottom)) - 58px);
    }

    .operations-panel-body {
        padding-bottom: 8px;
    }
}

@media (max-width: 420px) {
    .panel-header-actions {
        gap: 3px;
    }

    .panel-header-actions .primary-button {
        padding-inline: 8px;
        font-size: 10px;
    }

    .task-grid {
        grid-template-columns: 1fr;
    }

    .task-grid > .full,
    .task-grid > [data-span="full"] {
        grid-column: 1;
    }

    .task-feature-results {
        max-height: min(198px, 28dvh);
    }

    .task-feature-option {
        min-height: 46px;
    }

    .quick-grid.sign-types {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .quick-grid.sign-types .quick-card {
        min-height: 74px;
    }
}

@media (max-width: 379px) {
    .filters-panel .filter-choice {
        padding-inline: 6px;
        font-size: 12px;
    }

    .operations-toolbar {
        flex-wrap: wrap;
    }

    .operations-toolbar > select {
        width: 100%;
    }
}

@media (max-width: 359px) {
    .filters-panel .filter-list {
        grid-template-columns: 1fr;
    }

    .map-toolbar .icon-button {
        width: 32px;
        height: 32px;
    }

    .map-toolbar .icon-button svg {
        width: 18px;
        height: 18px;
    }

    .quick-grid.main-actions {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 980px) and (display-mode: standalone) {
    .operations-panel {
        max-height: calc(100vh - max(6px, env(safe-area-inset-top)) - max(12px, env(safe-area-inset-bottom)) - 58px);
    }
}

/* Account UI stays independent of map gestures and respects iPhone safe areas. */
.auth-view {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
    overflow: auto;
    background: #edf0e9;
    overscroll-behavior: contain;
    touch-action: pan-y;
}

.auth-card {
    width: min(100%, 380px);
    margin: auto;
    padding: 28px;
    border: 1px solid #d4dcd2;
    border-radius: 20px;
    background: #fafbf8;
}

.auth-brand {
    display: block;
    margin-bottom: 32px;
    color: var(--green-dark);
    font-size: 28px;
    font-weight: 750;
    letter-spacing: -1px;
    text-decoration: none;
}

.auth-brand span {
    display: block;
    margin-top: 3px;
    color: #657164;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0;
}

.auth-card h1 { margin: 0 0 22px; font-size: 22px; }
.auth-form { display: grid; gap: 16px; }
.auth-form .field { margin: 0; }
.auth-form input, .invite-result input { min-width: 0; font-size: 16px; }
.auth-form button { min-height: 44px; }
.auth-checkbox { display: flex; align-items: center; gap: 9px; font-size: 14px; }
.auth-checkbox input { width: 18px; height: 18px; accent-color: var(--green); }
.auth-message { margin: 0 0 16px; padding: 10px 12px; border-radius: 8px; background: #f8e9e6; color: #8c352e; font-size: 13px; }
.auth-message.is-success { color: #285e3c; background: #e5efe4; }
.auth-identity { margin: 0; color: #586356; font-size: 14px; }
.account-settings-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 16px; border-bottom: 1px solid #dce2d9; margin-bottom: 16px; }
.account-settings-row span { font-size: 13px; color: #657164; }
.account-dialog {
    width: min(460px, calc(100vw - 24px));
    max-height: calc(100dvh - max(16px, env(safe-area-inset-top)) - max(16px, env(safe-area-inset-bottom)));
    padding: 0;
    border: 1px solid #d0d9ce;
    border-radius: 18px;
    background: #fafbf8;
    color: #1b2920;
    overflow: auto;
    overscroll-behavior: contain;
    touch-action: pan-y;
}
.account-dialog::backdrop { background: #12201780; }
.account-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; }
.account-header h2 { margin: 0; font-size: 19px; }
.account-tabs { display: flex; gap: 4px; padding: 0 18px 12px; border-bottom: 1px solid #dce2d9; }
.account-tabs button { flex: 1; min-height: 40px; border: 0; border-radius: 9px; background: transparent; color: #586356; font-weight: 600; }
.account-tabs button[aria-pressed="true"] { color: var(--green-dark); background: #e3ece1; }
.account-body { padding: 18px; }
.account-body h3 { margin: 20px 0 12px; font-size: 15px; }
.account-identity { display: grid; gap: 4px; }
.account-identity span, .account-empty { color: #657164; font-size: 13px; }
.account-list { display: grid; gap: 4px; margin-bottom: 16px; }
.account-list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #e4e8e1; font-size: 14px; }
.account-list-row span { min-width: 0; overflow-wrap: anywhere; }
.account-list-row small { flex-shrink: 0; color: #657164; font-size: 11px; }
.account-list-row button { flex-shrink: 0; min-height: 36px; font-size: 12px; }
.account-password { margin-top: 22px; border-top: 1px solid #dce2d9; border-bottom: 1px solid #dce2d9; }
.account-password summary { padding: 16px 0; cursor: pointer; font-size: 14px; font-weight: 600; }
.account-password .auth-form { padding-bottom: 16px; }
.account-logout { margin-top: 18px; }
.invite-result { margin-top: 16px; display: grid; gap: 10px; }
.guest-login { position: absolute; z-index: 30; top: max(12px, env(safe-area-inset-top)); right: 12px; min-height: 40px; }
.guest-view .map-toolbar, .guest-view .sidebar, .guest-view .desktop-sidebar-toggle,
.guest-view .quick-add-button, .guest-view .mobile-sheet-toggle { display: none !important; }
.guest-view .map-stage { margin-left: 0; }
@media (max-width: 420px) {
    .auth-card { padding: 22px; }
}
