* {
    box-sizing: border-box;
}


html,
body {
    height: 100%;
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #162033;
    font-size: 14px;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

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

button {
    cursor: pointer;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(14, 116, 144, 0.22);
    outline-offset: 2px;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.68;
}

#map {
    width: 100%;
    height: 100vh;
    background: #edf2f7;
    cursor: grab;
}

#map.composing {
    cursor: crosshair;
}

.topbar {
    position: fixed;
    top: 12px;
    left: 12px;
    right: 12px;
    z-index: 700;
    display: grid;
    grid-template-columns: minmax(168px, auto) minmax(260px, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 7px;
    border: 1px solid rgba(30, 41, 59, 0.11);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.11), 0 1px 2px rgba(15, 23, 42, 0.05);
    backdrop-filter: blur(18px) saturate(1.2);
    animation: overlay-enter 0.55s cubic-bezier(0.215, 0.61, 0.355, 1) both;
}

.brand {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 9px;
    padding-right: 4px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 7px;
    background: #153a43;
    color: #fff;
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0;
}

.brand h1,
.feed-header h2 {
    margin: 0;
    color: #0f172a;
    font-size: 14px;
    font-weight: 720;
    line-height: 1.15;
}

.brand p,
.feed-header p {
    margin: 2px 0 0;
    color: #718096;
    font-size: 10.5px;
    font-weight: 520;
    line-height: 1.25;
}

.search-form {
    position: relative;
    display: block;
    min-width: 0;
}

.search-form input {
    min-width: 0;
    width: 100%;
    height: 36px;
    padding: 0 42px 0 12px;
    border: 1px solid #d7e0ea;
    border-radius: 6px;
    background: #f6f8fa;
    color: #0f172a;
    font-size: 12.5px;
    font-weight: 500;
}

.search-form button {
    position: absolute;
    top: 3px;
    right: 3px;
    display: grid;
    place-items: center;
    width: 30px;
    min-width: 30px;
    height: 30px;
    min-height: 30px;
    padding: 0;
    border-radius: 5px;
}

.search-form button svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.25;
    stroke-linecap: round;
}

.search-form input:focus,
#messageText:focus {
    outline: 3px solid rgba(14, 116, 144, 0.14);
    border-color: #0e7490;
}

.topbar-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.layers-menu {
    position: relative;
}

#layersBtn.is-active {
    border-color: #67e8f9;
    background: #ecfeff;
    color: #0e7490;
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.09);
}

.layers-popover {
    position: absolute;
    top: calc(100% + 9px);
    right: 0;
    z-index: 810;
    width: 270px;
    padding: 8px;
    border: 1px solid rgba(30, 41, 59, 0.13);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.2);
    backdrop-filter: blur(18px);
}

.layers-popover[hidden] {
    display: none;
}

.layers-title {
    margin: 2px 5px 7px;
    color: #64748b;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.layer-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px;
    border-radius: 7px;
    background: #f8fafc;
    cursor: pointer;
}

.layer-option:hover {
    background: #f0fdfa;
}

.layer-option-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.layer-option-copy strong {
    color: #172033;
    font-size: 11px;
    font-weight: 760;
}

.layer-option-copy small {
    margin-top: 2px;
    color: #718096;
    font-size: 9px;
}

.layer-option input {
    width: 32px;
    height: 18px;
    flex: none;
    appearance: none;
    border-radius: 999px;
    background: #cbd5e1;
    cursor: pointer;
    transition: background-color 160ms ease;
}

.layer-option input::before {
    content: "";
    display: block;
    width: 14px;
    height: 14px;
    margin: 2px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.25);
    transition: transform 160ms ease;
}

.layer-option input:checked {
    background: #0e7490;
}

.layer-option input:checked::before {
    transform: translateX(14px);
}

.btn,
.icon-button {
    min-height: 36px;
    border: 0;
    border-radius: 6px;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 680;
    transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.btn svg,
.icon-button svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

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

.btn-primary,
.search-form button {
    background: #0e7490;
    color: #fff;
    box-shadow: 0 6px 14px rgba(14, 116, 144, 0.2);
}

.btn-primary:hover,
.search-form button:hover {
    background: #0b6178;
}

.btn-secondary,
.icon-button {
    border: 1px solid #d7e0ea;
    background: rgba(248, 250, 252, 0.92);
    color: #1e293b;
}

.btn-secondary:hover,
.icon-button:hover {
    background: #f3f7fb;
}

.feed-panel {
    position: fixed;
    z-index: 650;
    top: 67px;
    left: 12px;
    width: min(324px, calc(100vw - 24px));
    max-height: min(560px, calc(100vh - 84px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(30, 41, 59, 0.11);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12), 0 1px 2px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(18px) saturate(1.2);
    animation: overlay-enter 0.62s cubic-bezier(0.215, 0.61, 0.355, 1) 0.06s both;
}

.rent-heatmap-summary {
    position: fixed;
    top: 67px;
    right: 12px;
    z-index: 640;
    width: min(286px, calc(100vw - 24px));
    padding: 11px 12px 10px;
    border: 1px solid rgba(30, 41, 59, 0.13);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(16px) saturate(1.2);
    animation: overlay-enter 0.3s ease both;
}

.rent-heatmap-summary[hidden] {
    display: none;
}

.rent-heatmap-heading {
    display: grid;
    grid-template-columns: 38px 1fr 24px;
    gap: 9px;
    align-items: center;
}

.rent-heatmap-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: linear-gradient(135deg, #0e7490, #14b8a6);
    color: #fff;
    font-size: 9px;
    font-weight: 850;
    box-shadow: 0 7px 16px rgba(14, 116, 144, 0.2);
}

.rent-heatmap-heading div {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.rent-heatmap-heading strong {
    color: #0f172a;
    font-size: 16px;
    font-weight: 840;
    letter-spacing: -0.02em;
}

.rent-heatmap-heading div span {
    color: #64748b;
    font-size: 9px;
}

#rentHeatmapClose {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #64748b;
    font-size: 20px;
    line-height: 1;
}

#rentHeatmapClose:hover {
    background: #f1f5f9;
    color: #0f172a;
}

#rentHeatmapMeta {
    margin: 9px 0 7px;
    color: #64748b;
    font-size: 9px;
}

.rent-heatmap-summary.is-loading #rentHeatmapAverage {
    color: #0e7490;
}

.rent-heatmap-scale {
    height: 7px;
    border-radius: 999px;
    background: linear-gradient(90deg, #155e75, #0891b2, #14b8a6, #facc15, #f97316, #dc2626);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.rent-heatmap-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    color: #64748b;
    font-size: 8px;
    font-weight: 700;
}

.rent-heat-cell {
    cursor: help;
    transition: fill-opacity 140ms ease;
    filter: drop-shadow(0 3px 6px rgba(15, 23, 42, 0.1));
}

.rent-heat-cell:hover {
    fill-opacity: 0.9;
}

.rent-heat-tooltip {
    border: 0 !important;
    border-radius: 7px !important;
    background: #0f172a !important;
    color: #fff !important;
    box-shadow: 0 9px 24px rgba(15, 23, 42, 0.24) !important;
    font-size: 10px !important;
}

.rent-heat-tooltip::before {
    border-top-color: #0f172a !important;
}

.rent-heat-tooltip strong {
    font-size: 12px;
}

.rent-heat-tooltip span {
    color: #cbd5e1;
}

.feed-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 11px 10px 9px 12px;
    border-bottom: 1px solid #e8eef5;
}

.feed-toolbar {
    display: flex;
    min-height: 41px;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-bottom: 1px solid #e8eef5;
    background: #fafcfd;
}

.select-control {
    position: relative;
    display: flex;
    flex: 1;
    min-width: 0;
    align-items: center;
}

.select-control svg {
    position: absolute;
    left: 8px;
    z-index: 1;
    width: 14px;
    height: 14px;
    fill: none;
    stroke: #64748b;
    stroke-width: 2;
    stroke-linecap: round;
}

.select-control select {
    width: 100%;
    height: 29px;
    padding: 0 28px 0 28px;
    border: 1px solid #d7e0ea;
    border-radius: 6px;
    appearance: none;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center;
    color: #334155;
    font-size: 10.5px;
    font-weight: 620;
}

.saved-count {
    flex: none;
    color: #0e7490;
    font-size: 9.5px;
    font-weight: 680;
    white-space: nowrap;
}

.icon-button {
    display: grid;
    place-items: center;
    min-width: 30px;
    width: 30px;
    height: 30px;
    min-height: 30px;
    padding: 0;
}

.icon-button.is-loading svg {
    animation: control-spin 0.8s linear infinite;
}

.feed-list {
    overflow: auto;
    padding: 5px 7px 8px;
    scrollbar-color: #c4ced8 transparent;
    scrollbar-width: thin;
}

.feed-list::-webkit-scrollbar {
    width: 5px;
}

.feed-list::-webkit-scrollbar-thumb {
    border-radius: 4px;
    background: #c4ced8;
}

.feed-item,
.feed-state {
    width: 100%;
    border-radius: 6px;
    padding: 8px 9px;
}

.feed-item {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid transparent;
    background: transparent;
    text-align: left;
    color: inherit;
    animation: item-reveal 0.34s cubic-bezier(0.215, 0.61, 0.355, 1) both;
    animation-delay: min(calc(var(--item-index, 0) * 28ms), 280ms);
}

.feed-item-main {
    min-width: 0;
    flex: 1;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
}

.feed-item-save {
    display: grid;
    flex: none;
    place-items: center;
    width: 28px;
    height: 28px;
    margin-left: 6px;
    padding: 0;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #94a3b8;
}

.feed-item-save:hover,
.feed-item-save.saved {
    background: #fff1f2;
    color: #be123c;
}

.feed-item-save svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.feed-item-save.saved svg {
    fill: currentColor;
}

.feed-item + .feed-item {
    margin-top: 2px;
}

.feed-item:hover,
.feed-item.active {
    border-color: #d6e0e7;
    background: #f3f7f8;
}

.feed-item.active {
    box-shadow: inset 3px 0 #0e7490;
}

.listing-feed-item {
    border-left: 2px solid #e28a32;
}

.feed-section-title {
    padding: 9px 4px 5px;
    color: #778393;
    font-size: 9px;
    font-weight: 760;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.feed-message {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: #0f172a;
    font-size: 12px;
    font-weight: 620;
    line-height: 1.38;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.feed-item-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.feed-item-meta .feed-time {
    margin: 0;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    height: 17px;
    padding: 0 5px;
    border-radius: 4px;
    background: #eef2f6;
    color: #52606d;
    font-size: 8.5px;
    font-weight: 720;
    line-height: 1;
    text-transform: uppercase;
}

.category-alert {
    background: #fff1f2;
    color: #be123c;
}

.category-event {
    background: #eef2ff;
    color: #4f46e5;
}

.category-recommendation {
    background: #ecfdf5;
    color: #047857;
}

.category-lost-found {
    background: #fff7ed;
    color: #c2410c;
}

.feed-time {
    margin: 4px 0 0;
    color: #778393;
    font-size: 10.5px;
    font-weight: 500;
    line-height: 1.3;
}

.feed-state {
    border: 1px dashed #bcccdc;
    color: #64748b;
    font-size: 12px;
    line-height: 1.45;
}

.pulse-marker {
    position: relative;
    z-index: 1;
    width: 52px !important;
    height: 52px !important;
    border: 0;
    background: transparent;
    pointer-events: auto;
}

.pulse-marker-inner {
    position: relative;
    display: block;
    width: 52px;
    height: 52px;
}

.pulse-ring,
.pulse-core {
    position: absolute;
    left: 50%;
    top: 50%;
    border-radius: 999px;
    transform: translate(-50%, -50%);
}

.pulse-category-alert .pulse-core {
    background: #e11d48;
}

.pulse-category-event .pulse-core {
    background: #4f46e5;
}

.pulse-category-recommendation .pulse-core {
    background: #059669;
}

.pulse-category-lost-found .pulse-core {
    background: #ea580c;
}

.pulse-category-event .pulse-ring {
    border-color: rgba(79, 70, 229, 0.72);
}

.pulse-category-recommendation .pulse-ring {
    border-color: rgba(5, 150, 105, 0.72);
}

.pulse-category-lost-found .pulse-ring {
    border-color: rgba(234, 88, 12, 0.72);
}

.pulse-ring {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(216, 67, 21, 0.82);
    animation: pulse-ring 2.1s ease-out infinite;
    pointer-events: none;
}

.pulse-ring-two {
    animation-delay: 0.7s;
}

.pulse-core {
    width: 14px;
    height: 14px;
    border: 2px solid #fff;
    background: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2), 0 4px 12px rgba(15, 23, 42, 0.32);
}

@keyframes pulse-ring {
    0% {
        opacity: 0.85;
        transform: translate(-50%, -50%) scale(0.45);
    }

    70% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(2.4);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(2.4);
    }
}

.listing-marker {
    width: 86px !important;
    height: 30px !important;
    border: 0;
    background: transparent;
}

.listing-marker.listing-marker-changed {
    width: 140px !important;
    height: 42px !important;
}

.listing-marker-label {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    max-width: 86px;
    height: 26px;
    padding: 0 9px;
    border: 2px solid #fff;
    border-radius: 999px;
    color: #fff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.24);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.listing-marker:hover .listing-marker-label {
    transform: translateY(-2px) scale(1.035);
}

.listing-marker-changed .listing-marker-label {
    gap: 6px;
    max-width: 140px;
    height: 32px;
    padding: 0 5px 0 10px;
    border-color: rgba(255, 255, 255, 0.96);
}

.listing-marker-reduced .listing-marker-label {
    background: linear-gradient(135deg, #0f766e 0%, #0d9488 52%, #10b981 100%);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.14), 0 10px 24px rgba(6, 95, 70, 0.34);
}

.listing-marker-increased .listing-marker-label {
    background: linear-gradient(135deg, #b45309 0%, #d97706 55%, #f59e0b 100%);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14), 0 10px 24px rgba(146, 64, 14, 0.3);
}

.listing-marker-price {
    min-width: 0;
    flex-shrink: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.listing-marker-change {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    height: 22px;
    padding: 0 6px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: #047857;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.14);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: -0.01em;
}

.listing-marker-increased .listing-marker-change {
    color: #b45309;
}

.listing-marker-reduced .listing-marker-label::after {
    border-top-color: #0d9488;
}

.listing-marker-increased .listing-marker-label::after {
    border-top-color: #d97706;
}

.listing-marker-label::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -7px;
    width: 0;
    height: 0;
    border-right: 6px solid transparent;
    border-left: 6px solid transparent;
    transform: translateX(-50%);
}

.listing-marker-sale {
    background: #0d9488;
}

.listing-marker-sale::after {
    border-top: 7px solid #0d9488;
}

.listing-marker-rent {
    background: #6366f1;
}

.listing-marker-rent::after {
    border-top: 7px solid #6366f1;
}

.listing-marker-stale .listing-marker-label {
    background: #64748b;
    box-shadow: 0 8px 18px rgba(51, 65, 85, 0.3);
}

.listing-marker-stale .listing-marker-label::after {
    border-top-color: #64748b;
}

.listing-cluster {
    display: grid;
    place-items: center;
    width: 48px !important;
    height: 48px !important;
    border: 0;
    border-radius: 999px;
    background: transparent;
}

.listing-cluster-count {
    display: grid;
    place-items: center;
    min-width: 38px;
    height: 38px;
    padding: 0 9px;
    border: 3px solid #fff;
    border-radius: 999px;
    background: #0f172a;
    color: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.28);
    font-size: 13px;
    font-weight: 850;
    line-height: 1;
}

.listing-cluster-has-change {
    position: relative;
}

.listing-cluster-has-change .listing-cluster-count {
    box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.14), 0 10px 24px rgba(15, 23, 42, 0.28);
}

.listing-cluster-change {
    position: absolute;
    top: -5px;
    right: -7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1px;
    min-width: 24px;
    height: 20px;
    padding: 0 5px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #10b981;
    color: #fff;
    box-shadow: 0 5px 12px rgba(6, 95, 70, 0.3);
    font-size: 9px;
    font-weight: 900;
    line-height: 1;
}

.listing-cluster-medium .listing-cluster-count {
    min-width: 44px;
    height: 44px;
    background: #1d4ed8;
}

.listing-cluster-large .listing-cluster-count {
    min-width: 50px;
    height: 50px;
    background: #be123c;
    font-size: 14px;
}

.compose-hint {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 710;
    transform: translateX(-50%);
    max-width: min(460px, calc(100vw - 32px));
    padding: 12px 14px;
    border-radius: 8px;
    background: #102a43;
    color: #fff;
    box-shadow: 0 12px 30px rgba(31, 41, 51, 0.22);
    font-size: 14px;
    text-align: center;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    inset: 0;
    padding: 18px;
    background-color: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(3px);
}

.modal-content {
    position: relative;
    width: min(500px, 100%);
    margin: 9vh auto 0;
    padding: 24px;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 18px 44px rgba(16, 42, 67, 0.24);
    max-height: calc(100vh - 72px);
    overflow-y: auto;
}

.modal[style*="display: block"] .modal-content {
    animation: detail-enter 0.38s cubic-bezier(0.215, 0.61, 0.355, 1) both;
}

#viewModal.is-listing .modal-content::after {
    content: "";
    position: absolute;
    top: -1px;
    right: -1px;
    width: 42px;
    height: 42px;
    border-bottom-left-radius: 8px;
    background: linear-gradient(225deg, #e28a32 0 47%, #fff7ed 49% 67%, #d7e0ea 69% 70%, transparent 72%);
    pointer-events: none;
    z-index: 1;
}

#viewModal.is-listing .modal-content {
    width: min(640px, 100%);
}

.close {
    position: absolute;
    top: 12px;
    right: 12px;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: #fff;
    color: #66788a;
    font-size: 24px;
    font-weight: 520;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12);
}

.close:hover,
.close:focus {
    color: #102a43;
    background: #f1f5f9;
}

.modal h2 {
    margin: 0 32px 8px 0;
    color: #0f172a;
    font-size: 18px;
    font-weight: 720;
    letter-spacing: 0;
}

.modal-kicker,
.message-time {
    margin: 0 0 16px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.4;
}

.field-label {
    display: block;
    margin: 0 0 6px;
    color: #334155;
    font-size: 11px;
    font-weight: 680;
}

.field-control {
    width: 100%;
    height: 38px;
    margin-bottom: 12px;
    padding: 0 11px;
    border: 1px solid #d7e0ea;
    border-radius: 6px;
    background: #fff;
    color: #0f172a;
    font-size: 13px;
}

.textarea-wrap {
    position: relative;
}

#messageText {
    width: 100%;
    min-height: 130px;
    margin-bottom: 16px;
    padding: 12px 12px 30px;
    resize: vertical;
    border: 1px solid #d7e0ea;
    border-radius: 6px;
    color: #0f172a;
    line-height: 1.5;
}

.message-counter {
    position: absolute;
    right: 10px;
    bottom: 25px;
    color: #94a3b8;
    font-size: 10px;
    font-variant-numeric: tabular-nums;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

#viewMessageText {
    margin: 0 0 12px;
    color: #0f172a;
    font-size: 14px;
    line-height: 1.55;
    white-space: pre-wrap;
}

.detail-eyebrow {
    margin: 0 0 10px;
    color: #0e7490;
    font-size: 10px;
    font-weight: 720;
    text-transform: uppercase;
}

.detail-actions {
    display: flex;
    gap: 8px;
    padding-top: 14px;
    border-top: 1px solid #e8eef5;
}

.detail-actions .btn {
    flex: 1;
    min-width: 0;
    padding: 0 9px;
}

.detail-actions .btn.saved {
    border-color: #fecdd3;
    background: #fff1f2;
    color: #be123c;
}

.house-view {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #e8eef5;
}

.house-view-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.house-view-kicker {
    margin: 0 0 3px;
    color: #0f766e;
    font-size: 8px;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.house-view-heading h3 {
    margin: 0;
    color: #0f172a;
    font-size: 17px;
    font-weight: 820;
    letter-spacing: -0.025em;
}

.house-view-heading p:last-child {
    margin: 3px 0 0;
    color: #64748b;
    font-size: 10px;
}

.house-view-total {
    flex: none;
    padding: 5px 8px;
    border: 1px solid #ccfbf1;
    border-radius: 999px;
    background: #f0fdfa;
    color: #0f766e;
    font-size: 9px;
    font-weight: 800;
}

.house-view-hero {
    position: relative;
    display: grid;
    grid-template-columns: 132px 1fr;
    min-height: 112px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 13px;
    background:
        radial-gradient(circle at 86% 14%, rgba(45, 212, 191, 0.24), transparent 31%),
        linear-gradient(135deg, #0f172a 0%, #153a43 58%, #115e59 100%);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.15);
}

.house-view-hero::after {
    content: "";
    position: absolute;
    right: -35px;
    bottom: -62px;
    width: 160px;
    height: 160px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 50%;
}

.house-illustration {
    position: relative;
    align-self: end;
    width: 88px;
    height: 91px;
    margin-left: 24px;
}

.house-roof {
    position: absolute;
    top: 0;
    left: 8px;
    width: 72px;
    height: 15px;
    border-radius: 4px 4px 1px 1px;
    background: linear-gradient(135deg, #f59e0b, #fb923c);
    transform: skewX(-20deg);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.22);
}

.house-building {
    position: absolute;
    right: 5px;
    bottom: 0;
    left: 5px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 13px;
    height: 76px;
    padding: 15px 14px;
    border-radius: 4px 4px 0 0;
    background: linear-gradient(155deg, #f8fafc, #dbeafe);
    box-shadow: 0 12px 24px rgba(2, 6, 23, 0.28);
}

.house-building i {
    display: block;
    border-radius: 2px;
    background: linear-gradient(135deg, #67e8f9, #0e7490);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.4);
}

.house-view-stats {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-self: center;
    gap: 10px;
    padding: 18px 22px 18px 8px;
}

.house-view-stats > div {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0 7px;
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
}

.house-stat-dot {
    grid-row: 1 / span 2;
    width: 9px;
    height: 9px;
    border: 2px solid rgba(255, 255, 255, 0.55);
    border-radius: 50%;
}

.house-stat-dot.is-active {
    background: #2dd4bf;
    box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.14);
}

.house-stat-dot.is-dormant {
    background: #94a3b8;
    box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.12);
}

.house-view-stats strong {
    color: #fff;
    font-size: 18px;
    line-height: 1;
}

.house-view-stats small {
    margin-top: 3px;
    color: #cbd5e1;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
}

.house-view-range {
    margin: 14px 3px 8px;
    color: #94a3b8;
    font-size: 8px;
    font-weight: 780;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.house-view-timeline {
    display: grid;
    gap: 8px;
}

.house-listing {
    display: grid;
    width: 100%;
    padding: 11px 12px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    color: inherit;
    text-align: left;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.045);
    transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.house-listing:hover,
.house-listing:focus-visible {
    transform: translateY(-1px);
    border-color: #99f6e4;
    box-shadow: 0 10px 22px rgba(15, 118, 110, 0.1);
}

.house-listing.is-selected {
    border-color: #5eead4;
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.1), 0 10px 22px rgba(15, 118, 110, 0.08);
}

.house-listing.is-dormant {
    background: linear-gradient(135deg, #fff, #f8fafc);
}

.house-listing-topline,
.house-listing-dates {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.house-listing-topline strong {
    color: #0f172a;
    font-size: 12px;
    font-weight: 840;
}

.house-listing-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #0f766e;
    font-size: 8px;
    font-weight: 820;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.house-listing-status i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #14b8a6;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.12);
}

.house-listing.is-dormant .house-listing-status {
    color: #64748b;
}

.house-listing.is-dormant .house-listing-status i {
    background: #94a3b8;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.13);
}

.house-listing-title {
    margin-top: 8px;
    color: #1e293b;
    font-size: 11px;
    font-weight: 780;
}

.house-listing-meta {
    margin-top: 2px;
    color: #64748b;
    font-size: 9px;
}

.house-listing-track {
    position: relative;
    height: 5px;
    margin-top: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8eef5;
}

.house-listing-track i {
    position: absolute;
    top: 0;
    bottom: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #0f766e, #2dd4bf);
}

.house-listing.is-dormant .house-listing-track i {
    background: linear-gradient(90deg, #64748b, #cbd5e1);
}

.house-listing-dates {
    margin-top: 6px;
    color: #94a3b8;
    font-size: 8px;
}

.related-listings {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #e8eef5;
}

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

.related-listings-heading h3 {
    margin: 0 0 2px;
    color: #0f172a;
    font-size: 13px;
    font-weight: 780;
}

.related-listings-heading p {
    margin: 0;
    color: #64748b;
    font-size: 10px;
}

.related-listings-count {
    display: grid;
    place-items: center;
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border-radius: 999px;
    background: #ecfeff;
    color: #0e7490;
    font-size: 10px;
    font-weight: 800;
}

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

.related-listing-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 16px;
    gap: 10px;
    align-items: center;
    width: 100%;
    padding: 10px 11px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
    color: inherit;
    text-align: left;
    transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.related-listing-item:hover,
.related-listing-item:focus-visible {
    transform: translateY(-1px);
    border-color: #a5d8df;
    box-shadow: 0 7px 18px rgba(15, 118, 110, 0.1);
}

.related-listing-main,
.related-listing-side {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.related-listing-address {
    overflow: hidden;
    color: #172033;
    font-size: 11px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.related-listing-meta {
    margin-top: 2px;
    overflow: hidden;
    color: #64748b;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.related-listing-side {
    align-items: flex-end;
    gap: 3px;
}

.related-listing-side strong {
    color: #0f766e;
    font-size: 10px;
    font-weight: 820;
    white-space: nowrap;
}

.related-listing-change {
    padding: 2px 5px;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 850;
}

.related-listing-change.is-reduced {
    background: #d1fae5;
    color: #047857;
}

.related-listing-change.is-increased {
    background: #fef3c7;
    color: #b45309;
}

.related-listing-arrow {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: #94a3b8;
    stroke-width: 2;
}

.toast {
    position: fixed;
    right: 16px;
    bottom: 32px;
    z-index: 1200;
    max-width: min(340px, calc(100vw - 32px));
    padding: 10px 13px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 7px;
    background: #153a43;
    color: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.24);
    font-size: 12px;
    font-weight: 620;
}

.listing-thumbnail {
    width: 100%;
    height: 180px;
    margin: 0 0 16px;
    object-fit: cover;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    background: #f8fafc;
}

.leaflet-control-zoom {
    margin-top: 80px !important;
    margin-left: 348px !important;
}

.leaflet-control-zoom,
.leaflet-control-attribution {
    border: 0 !important;
    border-radius: 8px !important;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.92) !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16) !important;
    backdrop-filter: blur(10px);
}

.leaflet-control-zoom a {
    width: 38px !important;
    height: 38px !important;
    border: 0 !important;
    color: #0f172a !important;
    font-size: 20px !important;
    line-height: 38px !important;
}

.leaflet-control-zoom a + a {
    border-top: 1px solid rgba(148, 163, 184, 0.24) !important;
}

.leaflet-control-zoom a:hover {
    background: #edf7f7 !important;
    color: #0e7490 !important;
}

.leaflet-control-attribution {
    margin: 0 12px 12px 0 !important;
    padding: 4px 8px !important;
    color: #475569 !important;
    font-size: 11px !important;
}

.leaflet-control-attribution a {
    color: #0e7490 !important;
}

@keyframes overlay-enter {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes item-reveal {
    from {
        opacity: 0;
        transform: translateY(7px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes detail-enter {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes control-spin {
    to {
        transform: rotate(360deg);
    }
}

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

@media (max-width: 860px) {
    .topbar {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .brand {
        display: none;
    }

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

    .layers-menu,
    #layersBtn {
        width: 100%;
    }

    .layers-popover {
        right: auto;
        left: 0;
    }

    .rent-heatmap-summary {
        top: 136px;
    }

    .feed-panel {
        top: auto;
        right: 12px;
        bottom: 12px;
        left: 12px;
        width: auto;
        max-height: 36vh;
    }

    .leaflet-control-zoom {
        margin-top: 136px !important;
        margin-left: 10px !important;
    }

    .leaflet-control-attribution {
        margin-bottom: calc(36vh + 24px) !important;
    }
}

@media (max-width: 520px) {
    .topbar {
        top: 10px;
        right: 10px;
        left: 10px;
        padding: 10px;
    }

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

    .btn {
        width: 100%;
    }

    .feed-panel {
        right: 10px;
        bottom: 10px;
        left: 10px;
        max-height: 34vh;
    }

    .topbar-actions .btn {
        padding: 0 7px;
        font-size: 10.5px;
    }

    .rent-heatmap-summary {
        top: 148px;
        right: 10px;
        width: min(260px, calc(100vw - 20px));
    }

    .modal-content {
        margin-top: 7vh;
        padding: 20px;
    }

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

    .detail-actions .btn {
        width: 100%;
        gap: 5px;
        padding: 0 5px;
        font-size: 10.5px;
    }

    .house-view-hero {
        grid-template-columns: 96px 1fr;
    }

    .house-illustration {
        width: 72px;
        margin-left: 13px;
    }

    .house-view-stats {
        gap: 6px;
        padding-right: 10px;
        padding-left: 4px;
    }

    .house-view-stats > div {
        padding: 9px 7px;
    }

    .leaflet-control-zoom {
        margin-top: 174px !important;
    }

    .leaflet-control-attribution {
        margin-bottom: calc(34vh + 20px) !important;
    }
}

/* Evidence-led property intelligence */
.rental-estimate {
    position: relative;
    margin-top: 18px;
    padding: 16px;
    overflow: hidden;
    border: 1px solid #fed7aa;
    border-radius: 13px;
    background:
        radial-gradient(circle at 94% 4%, rgba(251, 146, 60, 0.2), transparent 34%),
        linear-gradient(145deg, #fffaf5, #fff 64%);
    box-shadow: 0 12px 28px rgba(154, 52, 18, 0.07);
}

.rental-estimate::after {
    content: "≈";
    position: absolute;
    right: 16px;
    bottom: -22px;
    color: rgba(234, 88, 12, 0.07);
    font-size: 96px;
    font-weight: 850;
    line-height: 1;
    pointer-events: none;
}

.rental-estimate-heading {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.rental-estimate-heading p,
.house-purchases-heading p {
    margin: 0 0 3px;
    color: #c2410c;
    font-size: 8px;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.rental-estimate-heading h3 {
    margin: 0;
    color: #431407;
    font-size: 14px;
    font-weight: 820;
}

.rental-estimate-heading > span {
    padding: 4px 7px;
    border: 1px solid #fdba74;
    border-radius: 999px;
    background: #fff7ed;
    color: #c2410c;
    font-size: 8px;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.rental-estimate-value {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-top: 12px;
}

.rental-estimate-value strong {
    color: #9a3412;
    font-size: 25px;
    font-weight: 850;
    letter-spacing: -0.035em;
}

.rental-estimate-value span {
    color: #7c2d12;
    font-size: 10px;
    font-weight: 700;
}

#rentalEstimateMeta {
    position: relative;
    z-index: 1;
    margin: 9px 0 0;
    color: #78350f;
    font-size: 9px;
    line-height: 1.45;
}

.rental-estimate-disclaimer {
    position: relative;
    z-index: 1;
    margin: 6px 0 0;
    color: #9a6a54;
    font-size: 8px;
    line-height: 1.4;
}

.house-view {
    margin-top: 20px;
    padding-top: 18px;
}

.house-view-kicker {
    color: #c2410c;
}

.house-view-heading h3 {
    font-size: 19px;
}

.house-view-total {
    border-color: #fed7aa;
    background: #fff7ed;
    color: #c2410c;
}

.house-view-hero {
    display: grid;
    grid-template-columns: minmax(180px, 0.82fr) minmax(240px, 1.18fr);
    min-height: 226px;
    overflow: hidden;
    border: 0;
    border-radius: 16px;
    background:
        radial-gradient(circle at 12% 12%, rgba(249, 115, 22, 0.2), transparent 30%),
        linear-gradient(145deg, #071827 0%, #102f3b 56%, #0f4c4b 100%);
    box-shadow: 0 20px 44px rgba(15, 23, 42, 0.2);
}

.house-view-hero::after {
    right: -45px;
    bottom: -85px;
    width: 230px;
    height: 230px;
    border-color: rgba(255, 255, 255, 0.08);
}

.house-view-estimate {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 26px 18px 24px 24px;
}

.house-view-estimate > span {
    max-width: 150px;
    color: #fdba74;
    font-size: 8px;
    font-weight: 850;
    letter-spacing: 0.1em;
    line-height: 1.45;
    text-transform: uppercase;
}

.house-view-estimate strong {
    margin-top: 5px;
    color: #fff;
    font-size: 70px;
    font-weight: 880;
    letter-spacing: -0.08em;
    line-height: 0.98;
    text-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.house-view-estimate p {
    max-width: 145px;
    margin: 8px 0 0;
    color: #d9f3f0;
    font-size: 11px;
    font-weight: 720;
    line-height: 1.35;
}

.house-view-building {
    position: relative;
    z-index: 2;
    align-self: end;
    width: calc(100% - 28px);
    min-height: 188px;
    margin-right: 22px;
    padding: 23px 19px 20px;
    border-radius: 5px 5px 0 0;
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.07) 1px, transparent 1px) 0 0 / 36px 100%,
        linear-gradient(155deg, #fffaf2, #e7edf2);
    box-shadow: -16px 20px 40px rgba(2, 6, 23, 0.3);
}

.house-view-roof {
    position: absolute;
    top: -14px;
    right: -8px;
    left: -8px;
    height: 18px;
    border-radius: 5px 5px 1px 1px;
    background: linear-gradient(90deg, #c2410c, #f97316 58%, #fb923c);
    box-shadow: 0 8px 20px rgba(194, 65, 12, 0.28);
    transform: skewX(-7deg);
}

.house-view-units {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px 11px;
    padding-bottom: 22px;
}

.house-unit-window {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 2px 7px;
    min-width: 0;
    min-height: 39px;
    padding: 7px 8px;
    border: 1px solid rgba(8, 47, 73, 0.18);
    border-radius: 5px;
    background: linear-gradient(145deg, #164e63, #082f49);
    color: #e0f2fe;
    text-align: left;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.08), 0 5px 10px rgba(15, 23, 42, 0.16);
    cursor: pointer;
    transition: transform 150ms ease, box-shadow 150ms ease;
}

.house-unit-window:hover,
.house-unit-window:focus-visible {
    transform: translateY(-2px);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.12), 0 8px 15px rgba(15, 23, 42, 0.22);
}

.house-unit-window.is-active {
    background: linear-gradient(145deg, #0f766e, #115e59);
}

.house-unit-window.is-selected {
    outline: 3px solid rgba(249, 115, 22, 0.75);
    outline-offset: 2px;
}

.house-unit-window span {
    grid-row: 1 / span 2;
    color: #fdba74;
    font-size: 8px;
    font-weight: 850;
}

.house-unit-window strong {
    overflow: hidden;
    font-size: 10px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.house-view-door {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 27px;
    height: 32px;
    border-radius: 4px 4px 0 0;
    background: #713f12;
    box-shadow: inset -6px 0 rgba(0, 0, 0, 0.12);
    transform: translateX(-50%);
}

.house-view-door::after {
    content: "";
    position: absolute;
    top: 16px;
    right: 5px;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #fde68a;
}

.house-view-evidence {
    margin: 12px 3px 0;
    padding: 10px 12px;
    border-left: 3px solid #f97316;
    border-radius: 0 8px 8px 0;
    background: #fff7ed;
    color: #7c2d12;
    font-size: 9px;
    line-height: 1.5;
}

.house-view-range {
    margin: 13px 3px 8px;
    color: #64748b;
}

.house-view-timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.house-listing {
    min-width: 0;
    padding: 11px;
    border-color: #dbe4ec;
    border-radius: 11px;
}

.house-unit-name {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #334155;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.house-unit-name i {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: #0f172a;
    color: #fdba74;
    font-size: 8px;
    font-style: normal;
}

.house-listing-status {
    white-space: nowrap;
}

.house-listing-title {
    margin-top: 9px;
    color: #0f172a;
    font-size: 15px;
    letter-spacing: -0.02em;
}

.house-listing-track {
    height: 3px;
    overflow: visible;
    background: linear-gradient(90deg, #e2e8f0, #cbd5e1);
}

.house-listing-track i,
.house-listing.is-dormant .house-listing-track i {
    top: -3px;
    width: 9px !important;
    height: 9px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #f97316;
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.18);
    transform: translateX(-50%);
}

.house-purchases {
    margin-top: 16px;
    padding: 14px;
    border: 1px solid #dbe4ec;
    border-radius: 13px;
    background: #f8fafc;
}

.house-purchases-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.house-purchases-heading p {
    color: #0f766e;
}

.house-purchases-heading h4 {
    margin: 0;
    color: #0f172a;
    font-size: 13px;
    font-weight: 820;
}

.house-purchases-heading > span {
    padding: 4px 7px;
    border-radius: 999px;
    background: #ccfbf1;
    color: #0f766e;
    font-size: 8px;
    font-weight: 820;
}

.house-purchases-note {
    margin: 7px 0 10px;
    color: #64748b;
    font-size: 8px;
    line-height: 1.45;
}

.house-purchase-list {
    display: grid;
    gap: 6px;
}

.house-purchase-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 9px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}

.house-purchase-item > div:first-child {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.house-purchase-item strong {
    overflow: hidden;
    color: #1e293b;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.house-purchase-item span {
    color: #64748b;
    font-size: 8px;
}

.house-purchase-dates {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 4px;
}

.house-purchase-dates time {
    padding: 3px 5px;
    border-radius: 5px;
    background: #ecfeff;
    color: #0e7490;
    font-size: 7px;
    font-weight: 750;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .rental-estimate-value strong {
        font-size: 21px;
    }

    .house-view-hero {
        grid-template-columns: 118px 1fr;
        min-height: 205px;
    }

    .house-view-estimate {
        padding: 20px 10px 20px 16px;
    }

    .house-view-estimate strong {
        font-size: 58px;
    }

    .house-view-estimate p {
        font-size: 9px;
    }

    .house-view-building {
        width: calc(100% - 14px);
        min-height: 168px;
        margin-right: 10px;
        padding: 20px 10px 18px;
    }

    .house-view-units {
        gap: 7px;
    }

    .house-unit-window {
        min-height: 34px;
        padding: 5px;
    }

    .house-unit-window span {
        display: none;
    }

    .house-view-timeline {
        grid-template-columns: 1fr;
    }

    .house-purchase-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .house-purchase-dates {
        justify-content: flex-start;
    }
}

/* Kaufvertrag map layer */
.kaufvertrag-marker {
    border: 0;
    background: transparent;
}

.kaufvertrag-marker-paper {
    position: relative;
    display: grid;
    place-items: center;
    width: 30px;
    height: 34px;
    border: 2px solid #fff;
    border-radius: 7px 7px 7px 2px;
    background: linear-gradient(145deg, #f97316, #c2410c);
    color: #fff;
    box-shadow: 0 7px 16px rgba(124, 45, 18, 0.3), 0 0 0 1px rgba(124, 45, 18, 0.1);
    transform: rotate(-2deg);
    transition: transform 150ms ease, box-shadow 150ms ease;
}

.kaufvertrag-marker-paper::after {
    content: "";
    position: absolute;
    right: -2px;
    bottom: -7px;
    width: 0;
    height: 0;
    border-top: 8px solid #c2410c;
    border-left: 6px solid transparent;
}

.kaufvertrag-marker:hover .kaufvertrag-marker-paper {
    transform: rotate(0) translateY(-2px);
    box-shadow: 0 10px 22px rgba(124, 45, 18, 0.38), 0 0 0 2px rgba(251, 146, 60, 0.24);
}

.kaufvertrag-marker svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.kaufvertrag-marker b {
    position: absolute;
    top: -7px;
    right: -8px;
    display: grid;
    place-items: center;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #0f172a;
    color: #fff;
    font-size: 8px;
    font-weight: 850;
    line-height: 1;
}

.kaufvertrag-popup {
    display: grid;
    min-width: 180px;
    gap: 3px;
    padding: 2px;
}

.kaufvertrag-popup > span {
    color: #c2410c;
    font-size: 8px;
    font-weight: 850;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.kaufvertrag-popup strong {
    color: #0f172a;
    font-size: 13px;
    font-weight: 820;
}

.kaufvertrag-popup p {
    margin: 3px 0 0;
    color: #334155;
    font-size: 10px;
}

.kaufvertrag-popup small {
    color: #64748b;
    font-size: 9px;
}

/* Detailed Kaufvertrag history */
.house-purchases-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.house-purchases-actions > span {
    padding: 4px 7px;
    border-radius: 999px;
    background: #ccfbf1;
    color: #0f766e;
    font-size: 8px;
    font-weight: 820;
    white-space: nowrap;
}

.house-purchases-actions button {
    min-height: 25px;
    padding: 0 8px;
    border: 1px solid #99f6e4;
    border-radius: 7px;
    background: #fff;
    color: #0f766e;
    font-size: 8px;
    font-weight: 820;
    cursor: pointer;
}

.house-purchases-actions button:hover,
.house-purchases-actions button:focus-visible {
    border-color: #14b8a6;
    background: #f0fdfa;
}

.kaufvertrag-detail-modal {
    z-index: 1200;
}

.kaufvertrag-detail-content {
    width: min(1040px, 100%);
    margin-top: 3vh;
    padding: 26px;
    max-height: calc(100vh - 48px);
}

.kaufvertrag-detail-kicker {
    margin: 0 0 4px;
    color: #c2410c;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.kaufvertrag-detail-subtitle {
    margin: 0 42px 16px 0;
    color: #64748b;
    font-size: 11px;
}

.kaufvertrag-table-wrap {
    overflow: auto;
    border: 1px solid #dbe4ec;
    border-radius: 11px;
    max-height: calc(100vh - 190px);
}

.kaufvertrag-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    color: #334155;
    font-size: 10px;
}

.kaufvertrag-table th {
    position: sticky;
    z-index: 1;
    top: 0;
    padding: 10px 12px;
    border-bottom: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #64748b;
    font-size: 8px;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-align: left;
    text-transform: uppercase;
}

.kaufvertrag-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #edf2f7;
    background: #fff;
    vertical-align: top;
}

.kaufvertrag-table tr:last-child td {
    border-bottom: 0;
}

.kaufvertrag-table tbody tr:hover td {
    background: #fffaf5;
}

.kaufvertrag-table td strong,
.kaufvertrag-table td small {
    display: block;
}

.kaufvertrag-table td strong {
    color: #0f172a;
    font-size: 10px;
}

.kaufvertrag-table td small {
    margin-top: 2px;
    color: #94a3b8;
    font-size: 8px;
}

.kaufvertrag-table time {
    color: #0f766e;
    font-weight: 780;
    white-space: nowrap;
}

.kaufvertrag-table code {
    padding: 3px 5px;
    border-radius: 5px;
    background: #f1f5f9;
    color: #475569;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 8px;
    white-space: nowrap;
}

.kaufvertrag-table-note {
    margin: 10px 0 0;
    color: #94a3b8;
    font-size: 8px;
    line-height: 1.45;
}

.kaufvertrag-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
}

.kaufvertrag-pagination > span {
    color: #64748b;
    font-size: 9px;
    font-weight: 720;
}

.kaufvertrag-pagination > div {
    display: flex;
    gap: 6px;
}

.kaufvertrag-pagination button {
    min-height: 29px;
    padding: 0 10px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    background: #fff;
    color: #334155;
    font-size: 9px;
    font-weight: 760;
    cursor: pointer;
}

.kaufvertrag-pagination button:hover:not(:disabled),
.kaufvertrag-pagination button:focus-visible:not(:disabled) {
    border-color: #fb923c;
    color: #c2410c;
}

.kaufvertrag-pagination button:disabled {
    opacity: 0.4;
    cursor: default;
}

@media (max-width: 640px) {
    .house-purchases-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .house-purchases-actions {
        justify-content: space-between;
    }

    .kaufvertrag-detail-content {
        margin-top: 1vh;
        padding: 20px;
        max-height: calc(100vh - 20px);
    }

    .kaufvertrag-table-wrap {
        overflow: visible;
        border: 0;
        max-height: none;
    }

    .kaufvertrag-table,
    .kaufvertrag-table tbody,
    .kaufvertrag-table tr,
    .kaufvertrag-table td {
        display: block;
        width: 100%;
    }

    .kaufvertrag-table thead {
        display: none;
    }

    .kaufvertrag-table tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px 12px;
        margin-bottom: 8px;
        padding: 11px;
        border: 1px solid #dbe4ec;
        border-radius: 10px;
        background: #fff;
    }

    .kaufvertrag-table td {
        padding: 0;
        border: 0;
        background: transparent;
    }

    .kaufvertrag-table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 3px;
        color: #94a3b8;
        font-size: 7px;
        font-weight: 820;
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }

    .kaufvertrag-table td:nth-child(2),
    .kaufvertrag-table td:nth-child(4) {
        grid-column: 1 / -1;
    }
}
