:root {
    --bg: #f5f6f8;
    --surface: #ffffff;
    --border: #e4e7ec;
    --text: #1d2433;
    --muted: #667085;
    --accent: #0f5c63;
    --accent-soft: #e3f1f1;
    --green: #16794c;
    --green-soft: #e3f4ea;
    --red: #b42318;
    --red-soft: #fdecea;
    --amber: #a15c07;
    --amber-soft: #fdf2dc;
    --radius: 12px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
    --topbar: 56px;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
}

body {
    font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.45;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

h1, h2, h3 {
    margin: 0;
    line-height: 1.25;
}

[hidden] {
    display: none !important;
}

.muted {
    color: var(--muted);
}

.small {
    font-size: 12px;
}

/* ---------- top bar ---------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--topbar);
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 0 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 15px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font-size: 18px;
}

.topbar-title {
    display: flex;
    gap: 8px;
    align-items: baseline;
    padding-left: 24px;
    border-left: 1px solid var(--border);
}

.back {
    color: var(--accent);
    font-weight: 600;
    padding-left: 24px;
    border-left: 1px solid var(--border);
}

.back:hover {
    text-decoration: underline;
}

/* ---------- buttons, chips, badges ---------- */
.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    border: 1px solid var(--accent);
}

.btn:hover {
    filter: brightness(1.1);
}

.btn-ghost {
    background: var(--surface);
    color: var(--accent);
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chip {
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 999px;
    cursor: pointer;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}

.chip:hover {
    border-color: var(--accent);
}

.chip.is-on {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
}

.chips.static .chip {
    cursor: default;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .02em;
    background: rgba(255, 255, 255, .92);
    color: var(--text);
}

.badge-new {
    background: var(--accent);
    color: #fff;
}

.badge-drop {
    background: var(--green);
    color: #fff;
}

.badge-option {
    background: var(--amber);
    color: #fff;
}

.badge-project {
    background: #344054;
    color: #fff;
}

.epc {
    display: inline-grid;
    place-items: center;
    min-width: 26px;
    height: 20px;
    padding: 0 5px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
}

.epc-aplus, .epc-a {
    background: #138a43;
}

.epc-b {
    background: #58b947;
}

.epc-c {
    background: #b6cf2b;
    color: #1d2433;
}

.epc-d {
    background: #f5d311;
    color: #1d2433;
}

.epc-e {
    background: #f2a01d;
}

.epc-f {
    background: #e5532c;
}

.epc-g {
    background: #c4161c;
}

.price {
    font-size: 18px;
    font-weight: 700;
}

.price-muted {
    font-size: 15px;
    color: var(--muted);
    font-weight: 600;
}

.price-old {
    color: var(--muted);
    text-decoration: line-through;
    font-size: 13px;
    margin-left: 6px;
}

/* ---------- overview ---------- */
/* The overview fills exactly one screen: the card list and the map scroll on their own, not the page. */
body.page-overview {
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.overview {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(420px, 560px) 1fr;
}

.overview-list {
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-right: 1px solid var(--border);
}

.stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 14px 16px 12px;
    gap: 8px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
}

.stat-label {
    font-size: 11px;
    color: var(--muted);
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.select {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.select select {
    font: inherit;
    font-size: 13px;
    color: var(--text);
    padding: 5px 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
}

.cards {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 16px 24px;
}

.load-more {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 0 4px;
    font-size: 12px;
}

.postcode-form {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.postcode-form input {
    width: 72px;
    font: inherit;
    font-weight: 600;
    padding: 5px 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    text-align: center;
}

.postcode-form input:focus {
    outline: 2px solid var(--accent-soft);
    border-color: var(--accent);
}

.postcode-form .btn {
    padding: 5px 12px;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.card {
    display: flex;
    gap: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: border-color .15s, transform .15s;
}

.card:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.card.is-option {
    opacity: .78;
}

.card-photo {
    position: relative;
    flex: 0 0 170px;
    min-height: 130px;
    background: #e9ecf1;
}

.card-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.card-badges.inline {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.card-badges.inline .badge {
    background: var(--bg);
}

.card-badges.inline .badge-new {
    background: var(--accent);
}

.card-badges.inline .badge-drop {
    background: var(--green);
}

.card-badges.inline .badge-option {
    background: var(--amber);
}

.card-badges.inline .badge-project {
    background: #344054;
}

.card-body {
    flex: 1;
    min-width: 0;
    padding: 10px 12px 10px 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.card-price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0 8px;
}

.card-title {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-address {
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.facts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    margin-top: 6px;
    font-size: 12.5px;
}

.fact-type {
    color: var(--accent);
    font-weight: 600;
}

.card-agency {
    margin-top: auto;
    padding-top: 6px;
    font-size: 12px;
    color: var(--muted);
}

.empty {
    text-align: center;
    color: var(--muted);
    padding: 32px 0;
}

.overview-map {
    position: relative;
    min-height: 0;
}

.map {
    width: 100%;
    height: 100%;
    background: #e9ecf1;
}

/* price pins */
.pin-wrap {
    background: none;
    border: 0;
}

.pin {
    display: inline-block;
    transform: translate(-50%, -100%);
    padding: 3px 8px;
    border-radius: 999px;
    white-space: nowrap;
    font: 700 12px Inter, system-ui, sans-serif;
    background: var(--surface);
    color: var(--text);
    border: 1px solid rgba(16, 24, 40, .2);
    box-shadow: 0 2px 6px rgba(16, 24, 40, .25);
    transition: transform .12s;
}

.pin.is-option {
    color: var(--amber);
}

.pin.is-active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    transform: translate(-50%, -100%) scale(1.15);
}

.pin-dot {
    width: 18px;
    height: 18px;
    padding: 0;
    background: var(--accent);
    border: 3px solid #fff;
    transform: translate(-50%, -50%);
}

.leaflet-popup-content {
    margin: 0;
}

.leaflet-popup-content-wrapper {
    padding: 0;
    overflow: hidden;
    border-radius: var(--radius);
}

.popup {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-bottom: 10px;
    color: var(--text) !important;
}

.popup img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    margin-bottom: 6px;
}

.popup strong, .popup span, .popup small {
    padding: 0 12px;
}

.popup strong {
    font-size: 15px;
}

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

.notice {
    max-width: 560px;
    margin: 80px auto;
    padding: 0 16px;
    text-align: center;
}

.notice h1 {
    font-size: 20px;
    margin-bottom: 8px;
}

.notice p {
    color: var(--muted);
    margin-bottom: 20px;
}

/* ---------- detail ---------- */
.detail {
    max-width: 1240px;
    margin: 0 auto;
    padding: 20px 20px 48px;
}

.gallery {
    margin-bottom: 20px;
}

.gallery-main {
    position: relative;
    aspect-ratio: 16 / 7;
    border-radius: var(--radius);
    overflow: hidden;
    background: #1d2433;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 0;
    cursor: pointer;
    background: rgba(255, 255, 255, .9);
    font-size: 26px;
    line-height: 1;
    color: var(--text);
}

.gallery-nav.prev {
    left: 14px;
}

.gallery-nav.next {
    right: 14px;
}

.gallery-count {
    position: absolute;
    right: 14px;
    bottom: 14px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(16, 24, 40, .7);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

.gallery-thumbs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 8px 0 4px;
}

.thumb {
    flex: 0 0 auto;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: none;
    opacity: .7;
}

.thumb img {
    width: 76px;
    height: 56px;
    object-fit: cover;
}

.thumb.is-active, .thumb:hover {
    border-color: var(--accent);
    opacity: 1;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 20px;
    align-items: start;
}

.detail-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.detail-head h1 {
    font-size: 24px;
}

.detail-address {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 15px;
}

.keyfacts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
}

.keyfact {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--muted);
    font-size: 12px;
}

.keyfact span {
    color: var(--text);
    font-size: 18px;
    font-weight: 700;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow);
}

.panel h2 {
    font-size: 16px;
    margin-bottom: 12px;
}

.description {
    white-space: pre-line;
    color: #344054;
    font-size: 14.5px;
    line-height: 1.6;
}

.spec-groups {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 28px;
}

.spec-group {
    margin: 0;
}

.spec-group h3, .chips-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--accent);
    margin: 10px 0 4px;
}

.chips-title {
    margin-top: 18px;
    margin-bottom: 8px;
}

.spec {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px solid var(--border);
}

.spec dt {
    color: var(--muted);
}

.spec dd {
    margin: 0;
    font-weight: 600;
    text-align: right;
}

.detail-side {
    position: sticky;
    top: calc(var(--topbar) + 20px);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.side-price .price {
    font-size: 28px;
}

.side-price .price-old {
    font-size: 15px;
}

.drop {
    margin: 4px 0 0;
    color: var(--green);
    font-weight: 600;
}

.side-specs {
    margin: 12px 0 0;
}

.side-specs .spec:last-child {
    border-bottom: 0;
}

.detail-side > .panel:last-child .side-specs {
    margin-top: 0;
}

.side-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

.side-map {
    padding: 0;
    overflow: hidden;
}

.map-small {
    height: 240px;
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
    .overview {
        display: flex;
        flex-direction: column-reverse;
    }

    .overview-map {
        flex: 0 0 38%;
    }

    .overview-list {
        flex: 1;
        border-right: 0;
    }

    .stats .stat:nth-child(n+4) {
        display: none;
    }

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

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

    .detail-side {
        position: static;
    }

    .gallery-main {
        aspect-ratio: 4 / 3;
    }
}

@media (max-width: 560px) {
    .topbar {
        padding: 0 16px;
        gap: 12px;
    }

    .topbar-title > strong {
        display: none;
    }

    .topbar-title, .back {
        padding-left: 12px;
    }

    .card-photo {
        flex-basis: 120px;
    }

    .spec-groups {
        grid-template-columns: 1fr;
    }

    .detail {
        padding: 16px;
    }
}

/* ---------- fetch / refresh ---------- */
.fetch-form {
    margin: 0;
}

.fetch-form .btn {
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.fetch-form .btn:disabled {
    opacity: .6;
    cursor: progress;
}

.fetched-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 16px;
    font-size: 12.5px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.fetched-bar .btn {
    padding: 5px 12px;
    font-size: 13px;
}

.fetched-bar.side {
    padding: 12px 0 0;
    margin-top: 16px;
    border-bottom: 0;
    border-top: 1px solid var(--border);
}

.notice .fetch-form {
    display: inline-block;
}

.card-foot {
    margin-top: auto;
    padding-top: 6px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    color: var(--muted);
}

.details-ok {
    color: var(--green);
    font-weight: 600;
    white-space: nowrap;
}

.flash {
    max-width: 1240px;
    margin: 12px auto 0;
    padding: 10px 14px;
    border-radius: 8px;
    font-weight: 500;
}

.flash-error {
    background: var(--red-soft);
    color: var(--red);
    border: 1px solid #f5c2bd;
}

.page-overview .flash {
    margin: 12px 16px 0;
}

.pending {
    display: flex;
    gap: 20px;
    padding: 0;
    overflow: hidden;
}

.pending-photo {
    flex: 0 0 320px;
    width: 320px;
    object-fit: cover;
}

.pending-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 20px;
}

.pending-body h1 {
    font-size: 22px;
}

.pending-body .detail-address {
    margin: 0;
}

@media (max-width: 560px) {
    .pending {
        flex-direction: column;
    }

    .pending-photo {
        width: 100%;
        flex-basis: auto;
        height: 200px;
    }
}

/* ---------- topbar: view switch & export ---------- */
.topbar-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.view-switch {
    display: inline-flex;
    padding: 3px;
    border-radius: 9px;
    background: var(--bg);
    border: 1px solid var(--border);
}

.view-switch a {
    padding: 4px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}

.view-switch a.is-active {
    background: var(--surface);
    color: var(--accent);
    box-shadow: var(--shadow);
}

.btn-sm {
    padding: 5px 12px;
    font-size: 13px;
}

/* ---------- table view ---------- */
.sheet {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.sheet-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    padding: 10px 16px;
    font-size: 12.5px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.sheet-search {
    width: 320px;
    max-width: 100%;
    font: inherit;
    font-size: 13px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.sheet-search:focus {
    outline: 2px solid var(--accent-soft);
    border-color: var(--accent);
}

.sheet-toolbar-end {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sheet-toolbar-end .btn {
    padding: 5px 12px;
    font-size: 13px;
}

.sheet-wrap {
    flex: 1;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    background: var(--surface);
}

.sheet-table {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.sheet-table th,
.sheet-table td {
    padding: 6px 10px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

.sheet-table .num {
    text-align: right;
}

.sheet-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 0;
    background: #eef0f4;
    font-size: 12px;
    color: #344054;
}

.sheet-table thead th button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: inherit;
    gap: 4px;
    padding: 8px 10px;
    border: 0;
    background: none;
    font: inherit;
    font-weight: 600;
    color: inherit;
    cursor: pointer;
    white-space: nowrap;
}

.sheet-table thead th.num button {
    justify-content: flex-end;
}

.sheet-table thead th button:hover {
    background: #e3e7ee;
}

.sort-icon::after {
    content: '↕';
    color: #98a2b3;
    font-size: 11px;
}

[data-sorted="asc"] .sort-icon::after {
    content: '↑';
    color: var(--accent);
}

[data-sorted="desc"] .sort-icon::after {
    content: '↓';
    color: var(--accent);
}

.sheet-table tbody tr {
    cursor: pointer;
}

.sheet-table tbody tr:nth-child(even) td {
    background: #fafbfc;
}

.sheet-table tbody tr:hover td {
    background: var(--accent-soft);
}

.sheet-table tbody tr.is-option td {
    color: var(--muted);
}

.sheet-table tbody tr:target td {
    animation: row-flash 2s ease-out;
}

@keyframes row-flash {
    from { background: #fff4c2; }
}

.sheet-table tfoot td {
    position: sticky;
    bottom: 0;
    background: #eef0f4;
    font-weight: 600;
    font-size: 12px;
}

.thumb-cell {
    padding: 3px !important;
}

.thumb-cell img {
    width: 52px;
    height: 38px;
    object-fit: cover;
    border-radius: 4px;
}

.title-cell {
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.title-cell a {
    font-weight: 600;
    color: var(--accent);
}

.title-cell a:hover {
    text-decoration: underline;
}

.cell-sub {
    display: block;
    font-size: 11px;
    color: var(--muted);
    margin: 0;
}

.badge-cell .badge {
    background: var(--bg);
    margin-right: 3px;
}

.badge-cell .badge-new { background: var(--accent); }
.badge-cell .badge-drop { background: var(--green); }
.badge-cell .badge-option { background: var(--amber); }
.badge-cell .badge-project { background: #344054; }

.sheet .load-more {
    padding: 16px 0 24px;
}

@media (max-width: 960px) {
    .topbar-title > strong,
    .postcode-form .btn {
        display: none;
    }

    .topbar-actions .btn-sm {
        font-size: 0;
        padding: 5px 10px;
    }

    .topbar-actions .btn-sm::before {
        content: 'CSV';
        font-size: 13px;
    }

    .sheet-toolbar-end {
        margin-left: 0;
    }
}

/* ---------- responsive: tablet & phone ---------- */
.pane-toggle,
.head-price {
    display: none;
}

@media (max-width: 960px) {
    .head-price {
        display: flex;
        align-items: baseline;
        flex-wrap: wrap;
        gap: 4px 10px;
        margin-top: 10px;
    }

    .head-price .price {
        font-size: 24px;
    }

    .detail .gallery-main {
        aspect-ratio: 16 / 10;
    }

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

    .sheet-search {
        flex: 1 1 220px;
    }
}

@media (max-width: 640px) {
    :root {
        --topbar: 52px;
    }

    .topbar {
        gap: 8px;
        padding: 0 12px;
    }

    .brand > span:not(.brand-mark) {
        display: none;
    }

    .topbar-title,
    .back {
        padding-left: 8px;
    }

    .postcode-form input {
        width: 64px;
    }

    .topbar-actions {
        gap: 6px;
    }

    .view-switch a {
        padding: 4px 10px;
    }

    /* overview: one pane at a time, switched with the floating button */
    .overview {
        display: block;
        position: relative;
    }

    .overview-list,
    .overview-map {
        height: 100%;
    }

    .overview[data-pane="list"] .overview-map,
    .overview[data-pane="map"] .overview-list {
        display: none;
    }

    .pane-toggle {
        display: block;
        position: absolute;
        left: 50%;
        bottom: 20px;
        z-index: 1001;
        transform: translateX(-50%);
        padding: 10px 22px;
        border: 0;
        border-radius: 999px;
        background: var(--text);
        color: #fff;
        font: inherit;
        font-weight: 600;
        box-shadow: 0 4px 14px rgba(16, 24, 40, .35);
        cursor: pointer;
    }

    .stats {
        padding: 10px 12px;
    }

    .stat-value {
        font-size: 14px;
    }

    .fetched-bar,
    .toolbar {
        padding: 8px 12px;
    }

    .toolbar .select {
        flex: 1;
    }

    .toolbar .select select {
        flex: 1;
    }

    .cards {
        padding: 10px 12px 80px;
    }

    .card {
        gap: 10px;
    }

    .card-photo {
        flex-basis: 108px;
        min-height: 120px;
    }

    .card-body {
        padding-right: 10px;
    }

    .card .price {
        font-size: 16px;
    }

    .card-title {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .facts {
        gap: 2px 8px;
        font-size: 12px;
    }

    /* table */
    .sheet-toolbar {
        padding: 8px 12px;
    }

    .sheet-toolbar-end {
        width: 100%;
        justify-content: space-between;
    }

    .title-cell {
        max-width: 200px;
    }

    /* detail */
    .detail {
        padding: 12px 12px 32px;
    }

    .detail .gallery-main {
        aspect-ratio: 4 / 3;
        border-radius: 10px;
    }

    .gallery-nav {
        width: 36px;
        height: 36px;
        font-size: 22px;
    }

    .detail-head h1 {
        font-size: 20px;
        overflow-wrap: anywhere;
    }

    .keyfacts {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .keyfact {
        padding: 10px;
    }

    .keyfact span {
        font-size: 16px;
    }

    .panel {
        padding: 14px;
    }

    .description {
        font-size: 14px;
    }

    .pending-photo {
        width: 100%;
        flex-basis: auto;
        height: 200px;
    }

    .pending {
        flex-direction: column;
    }
}

.foot-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.modified {
    cursor: help;
    border-bottom: 1px dotted currentColor;
}

.card-foot > span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .modified-label {
        display: none;
    }
}

/* "geplaatst op" in the table: long time on the market stands out */
.published-cell .fetch-form .btn {
    padding: 2px 10px;
    font-size: 12px;
}

.published-cell.is-long strong,
.published-cell.is-long .cell-sub {
    color: var(--amber);
}

.published-cell.is-very-long strong,
.published-cell.is-very-long .cell-sub {
    color: var(--red);
}

/* route planning: let the user pick their maps app */
.route {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
}

.route-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
}

.route-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.route-buttons .btn {
    padding: 9px 10px;
    font-size: 13px;
}
