/* ------------------------------------------------------------------
   Katalog arboristů – the Stromopedie forest theme on top of MudBlazor
   ------------------------------------------------------------------ */
:root {
    --forest: #2f5d3a;
    --forest-deep: #24482d;
    --moss: #6b8f4e;
    --sage: #a9b89a;
    --bark: #5a3e2b;
    --amber: #c98a2b;
    --paper: #f6f1e7;
    --paper-2: #efe7d6;
    --paper-3: #e3d9c6;
    --surface: #fffdf8;
    --ink: #2a2620;
    --ink-soft: #6b6259;
    --serif: "Fraunces", Georgia, serif;
    --sans: "Source Sans 3", "Segoe UI", sans-serif;
    --radius: 14px;
    --shadow-sm: 0 1px 2px rgba(42, 38, 32, .06), 0 4px 14px rgba(42, 38, 32, .06);
    --shadow-md: 0 6px 24px rgba(42, 38, 32, .12);
    --max: 1240px;

    --appbar: #24482d;
    --forest-tint: rgba(47, 93, 58, .12);
    --amber-ink: #8a5c15;
    --bad: #a23b2c;
    --bad-ink: #8a2f22;
    --exam-ink: #4a4a8c;
    /* Text on the app bar and the lightbox, which are dark in both themes. */
    --on-dark: #f6f1e7;
    color-scheme: light;
}

/* --- dark: the forest at night ---------------------------------------
   Not an inversion of the paper: a deep green-black ground, warm off-white
   ink, and the greens and ambers lifted so they still read as the same
   hues on a dark surface. Mirrored in MainLayout.razor (PaletteDark) for
   MudBlazor's own controls. Declared twice: the media query follows the
   operating system, the attribute is a theme pinned in the app bar. */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --forest: #8cc59a;
        --forest-deep: #b7dcbf;
        --moss: #9cc07e;
        --sage: #56654d;
        --bark: #d8b193;
        --amber: #e0a345;
        --paper: #111510;
        --paper-2: #182017;
        --paper-3: #2b3529;
        --surface: #172016;
        --ink: #ebe6da;
        --ink-soft: #aaa393;
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 14px rgba(0, 0, 0, .3);
        --shadow-md: 0 6px 24px rgba(0, 0, 0, .5);
        --appbar: #0c110b;
        --forest-tint: rgba(140, 197, 154, .14);
        --amber-ink: #eab865;
        --bad: #e0715f;
        --bad-ink: #f2a597;
        --exam-ink: #b3b3ec;
    }
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --forest: #8cc59a;
    --forest-deep: #b7dcbf;
    --moss: #9cc07e;
    --sage: #56654d;
    --bark: #d8b193;
    --amber: #e0a345;
    --paper: #111510;
    --paper-2: #182017;
    --paper-3: #2b3529;
    --surface: #172016;
    --ink: #ebe6da;
    --ink-soft: #aaa393;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 14px rgba(0, 0, 0, .3);
    --shadow-md: 0 6px 24px rgba(0, 0, 0, .5);
    --appbar: #0c110b;
    --forest-tint: rgba(140, 197, 154, .14);
    --amber-ink: #eab865;
    --bad: #e0715f;
    --bad-ink: #f2a597;
    --exam-ink: #b3b3ec;
}

html, body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--forest); }
a:hover { color: var(--forest-deep); }

.main-content {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content > :not(.site-footer) { flex-shrink: 0; }

.page {
    max-width: var(--max);
    margin: 0 auto;
    padding: 24px 20px 48px;
}

/* --- app bar ------------------------------------------------------- */
.app-bar {
    background: var(--appbar) !important;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--on-dark);
    text-decoration: none;
}

.brand-mark { display: inline-flex; color: #cfe0c3; }

.brand-name {
    white-space: nowrap;
    font-family: var(--serif);
    font-size: 1.45rem;
    font-weight: 500;
    letter-spacing: .01em;
}

/* --- hero ---------------------------------------------------------- */
.hero {
    background:
        radial-gradient(900px 400px at 15% -10%, rgba(107, 143, 78, .28), transparent 60%),
        radial-gradient(700px 360px at 90% 0%, rgba(201, 138, 43, .18), transparent 60%),
        linear-gradient(180deg, var(--paper-2), var(--paper));
    border-bottom: 1px solid var(--paper-3);
}

.hero-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 56px 20px 44px;
}

.hero-kicker {
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: .78rem;
    font-weight: 600;
    color: var(--moss);
}

.hero-title {
    font-family: var(--serif);
    font-weight: 500;
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    line-height: 1.05;
    margin: 0 0 14px;
    color: var(--forest-deep);
    max-width: 16ch;
}

.hero-lead {
    font-size: 1.15rem;
    max-width: 58ch;
    color: var(--ink-soft);
    margin: 0 0 26px;
}

.hero-search { max-width: 640px; }

.search-box .mud-input-outlined {
    background: var(--surface);
    font-size: 1.1rem;
    box-shadow: var(--shadow-sm);
}

/* --- app bar navigation -------------------------------------------- */
.app-nav { display: flex; gap: 4px; margin: 0 4px 0 8px; }

.app-nav-link {
    white-space: nowrap;
    color: var(--on-dark);
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 8px;
    font-weight: 600;
}

.app-nav-link:hover { color: var(--on-dark); background: rgba(255, 255, 255, .08); }

/* --- catalogue ------------------------------------------------------ */
.catalog {
    max-width: var(--max);
    margin: 0 auto;
    padding: 28px 20px 56px;
    width: 100%;
    box-sizing: border-box;
}

.catalog-layout {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}

.catalog-filters {
    position: sticky;
    top: 80px;
    background: var(--surface);
    border: 1px solid var(--paper-3);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.filter-label {
    display: block;
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    font-weight: 600;
    color: var(--ink-soft);
    margin-bottom: 6px;
}

.filter-hint { color: var(--ink-soft); font-size: .8rem; margin: 6px 0 0; }

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

.facet-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--paper-3);
    background: var(--paper);
    color: var(--ink);
    font: inherit;
    font-size: .9rem;
    cursor: pointer;
    text-align: left;
    transition: background-color .12s, border-color .12s;
}

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

.facet-chip.active {
    background: var(--forest-tint);
    border-color: var(--forest);
    color: var(--forest-deep);
    font-weight: 600;
}

.facet-chips.static .facet-chip { cursor: default; min-height: 0; }

.facet-count { color: var(--ink-soft); font-size: .8rem; font-weight: 400; }

.catalog-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 12px;
    margin-bottom: 16px;
}

.catalog-count { margin: 0; color: var(--ink-soft); }
.catalog-count strong { color: var(--ink); }

.filters-toggle, .filters-close { display: none !important; }

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 16px;
}

.show-more { display: flex; justify-content: center; margin-top: 24px; }

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 48px 16px;
    text-align: center;
    color: var(--ink-soft);
    background: var(--surface);
    border: 1px dashed var(--paper-3);
    border-radius: var(--radius);
}

/* --- arborist card -------------------------------------------------- */
.arborist-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid var(--paper-3);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    min-width: 0;
}

.arborist-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }

.arborist-card-name {
    font-family: var(--serif);
    font-size: 1.15rem;
    font-weight: 500;
    line-height: 1.25;
    text-decoration: none;
    color: var(--forest-deep);
    overflow-wrap: anywhere;
}

.arborist-card-name:hover { text-decoration: underline; }

.kind-badge {
    flex-shrink: 0;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 600;
    color: var(--ink-soft);
    background: var(--paper-2);
    border-radius: 999px;
    padding: 3px 9px;
}

.arborist-card-place, .arborist-card-regions {
    margin: 0;
    color: var(--ink-soft);
    font-size: .92rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.arborist-card-actions {
    margin-top: auto;
    padding-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    align-items: center;
}

.card-action {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 40px;
    text-decoration: none;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.card-rating { display: inline-flex; align-items: center; gap: 4px; color: var(--amber-ink); font-size: .9rem; }

/* --- certificate chips ---------------------------------------------- */
.cert-chips { display: flex; flex-wrap: wrap; gap: 5px; }

.cert-chip {
    font-size: .8rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 999px;
    color: var(--forest-deep);
    background: var(--forest-tint);
    border: 1px solid transparent;
}

.cert-chip.expired { color: var(--ink-soft); background: transparent; border-color: var(--paper-3); text-decoration: line-through; }
.cert-chip.more { color: var(--ink-soft); background: var(--paper-2); }

/* --- pages ------------------------------------------------------------ */
.page { width: 100%; box-sizing: border-box; }

.page-title {
    font-family: var(--serif);
    font-weight: 500;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    line-height: 1.1;
    color: var(--forest-deep);
    margin: 6px 0 8px;
    overflow-wrap: anywhere;
}

.back-link { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; text-decoration: none; font-weight: 600; }

.detail-head { margin-bottom: 20px; }
.detail-place { margin: 0; color: var(--ink-soft); font-size: 1.1rem; }

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    align-items: start;
}

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

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

.card-title {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 1.2rem;
    margin: 0 0 12px;
    color: var(--forest-deep);
}

.cert-list, .people-list, .offer-list, .sources ul { list-style: none; margin: 0; padding: 0; }

.cert-list li, .people-list li {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 4px 12px;
    padding: 9px 0;
    border-bottom: 1px solid var(--paper-3);
}

.cert-list li:last-child, .people-list li:last-child { border-bottom: 0; }
.cert-name { font-weight: 600; }
.cert-validity { color: var(--ink-soft); }
.cert-list li.expired .cert-name { color: var(--ink-soft); text-decoration: line-through; }
.person-name { font-weight: 600; }

.offer-list { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.detail-description { margin: 0; white-space: pre-line; }

.facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 14px; margin: 0; }
.facts dt { color: var(--ink-soft); font-size: .9rem; }
.facts dd { margin: 0; overflow-wrap: anywhere; }

.sources li { padding: 4px 0; }
.sources-note { margin: 12px 0 0; font-size: .9rem; color: var(--ink-soft); }

.prose { max-width: 760px; }
.prose h2 { font-family: var(--serif); font-weight: 500; color: var(--forest-deep); margin-top: 28px; }
.prose li { margin-bottom: 6px; }
.muted { color: var(--ink-soft); }


/* --- maps ------------------------------------------------------------ */
.view-toggle {
    display: inline-flex;
    border: 1px solid var(--paper-3);
    border-radius: 999px;
    background: var(--surface);
    padding: 3px;
    margin-left: auto;
}

.view-toggle-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 4px 14px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--ink-soft);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.view-toggle-button.active { background: var(--forest-tint); color: var(--forest-deep); }

.map-frame {
    width: 100%;
    border: 1px solid var(--paper-3);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--paper-2);
    z-index: 0;
}

.catalog-map { height: min(70vh, 640px); min-height: 360px; }
.detail-map { height: 320px; margin-top: 10px; }
.map-no-tiles { background: var(--paper-2); }

.map-note { color: var(--ink-soft); font-size: .9rem; margin: 10px 2px 0; }

.map-legend { display: inline-flex; align-items: center; gap: 6px; margin-right: 12px; color: var(--ink); }
.legend-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: var(--amber); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--paper-3); }
.legend-dot.certified { background: var(--forest); }

.map-logo img { display: block; height: 22px; margin: 0 0 4px 4px; }

.leaflet-container { font-family: var(--sans); background: var(--paper-2); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface); color: var(--ink); }
.leaflet-container a.leaflet-popup-close-button { color: var(--ink-soft); }
.leaflet-control-attribution { background: rgba(255, 253, 248, .85) !important; color: #4a4540; }
.leaflet-control-attribution a { color: #2f5d3a; }

.map-popup { display: flex; flex-direction: column; gap: 6px; min-width: 180px; }
.map-popup-name { font-family: var(--serif); font-size: 1.05rem; font-weight: 500; text-decoration: none; }
.map-popup-place { color: var(--ink-soft); font-size: .88rem; }

.region-tooltip { font-weight: 600; }

/* Area names on the map: dark with a white halo, readable over any tile (as on boudakaci.cz). */
.area-label {
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    color: #1f2a22;
    font-family: var(--sans);
    font-weight: 700;
    font-size: 13px;
    text-shadow: 0 0 3px #fff, 0 0 6px #fff, 0 0 9px #fff;
    white-space: nowrap;
}

.area-label::before { display: none; }

/* 40 px zoom buttons: touch targets on a phone. */
.map-frame .leaflet-bar a { width: 40px; height: 40px; line-height: 40px; font-size: 20px; }
.leaflet-container a.leaflet-popup-close-button { width: 32px; height: 32px; font-size: 22px; line-height: 30px; }

.area-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.area-chips li { padding: 5px 12px; border-radius: 999px; background: rgba(242, 193, 78, .35); color: var(--ink); font-weight: 600; font-size: .9rem; }
.area-chips li.seat { background: rgba(201, 138, 43, .45); }


/* --- admin ------------------------------------------------------------- */
.admin .page-title { margin-top: 4px; }
.admin-wide { max-width: 1600px; }

.admin-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--paper-3);
}

.admin-nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 6px 14px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.admin-nav-link:hover { background: var(--paper-2); color: var(--ink); }
.admin-nav-link.active { background: var(--forest-tint); color: var(--forest-deep); }
.admin-logout { margin-left: auto; }

.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.admin-grid .card, .admin .card + .card { margin-top: 0; }
.admin > section.card { margin-bottom: 16px; }

.admin-title-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.admin-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.admin-progress { width: 220px; }
.admin-intro { max-width: 90ch; }
.admin-subtitle { margin: 18px 0 8px; font-size: 1rem; }
.admin-alert { display: block; margin-top: 8px; color: var(--bad); font-weight: 600; }

.admin-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.admin-filters .text-input { flex: 1 1 200px; max-width: 320px; }
.admin-check { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; }
.status-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }

.text-input {
    min-height: 40px;
    padding: 6px 12px;
    border: 1px solid var(--paper-3);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    box-sizing: border-box;
}

.primary-button, .secondary-button, .link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 6px 16px;
    border-radius: 999px;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.primary-button { border: 0; background: var(--forest); color: var(--surface); }
.primary-button:hover { background: var(--forest-deep); color: var(--surface); }
.secondary-button { border: 1px solid var(--forest); background: transparent; color: var(--forest); }
.link-button { min-height: 0; padding: 0; border: 0; background: none; color: var(--forest); border-radius: 0; }

.login-card { display: flex; flex-direction: column; gap: 10px; max-width: 360px; }

.table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.admin-table th {
    text-align: left;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--ink-soft);
    padding: 8px 10px;
    border-bottom: 1px solid var(--paper-3);
    white-space: nowrap;
}
.admin-table td { padding: 8px 10px; border-bottom: 1px solid var(--paper-3); vertical-align: top; }
.admin-table tr.clickable { cursor: pointer; }
.admin-table tr.clickable:hover td { background: var(--paper-2); }
.admin-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.mono { font-family: "Cascadia Mono", Consolas, ui-monospace, monospace; font-size: .82rem; }

/* The raw text a price came from: kept whole, but compact. */
.raw-text { min-width: 280px; max-width: 640px; font-size: .84rem; color: var(--ink-soft); white-space: pre-line; }
.price-table td:first-child { min-width: 160px; }

.log-table tr.log-warning td { background: rgba(201, 138, 43, .10); }
.log-table tr.log-error td { background: rgba(162, 59, 44, .10); }
.log-pre {
    max-height: 420px;
    overflow: auto;
    margin: 6px 0 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--paper-2);
    font-family: "Cascadia Mono", Consolas, ui-monospace, monospace;
    font-size: .78rem;
    white-space: pre-wrap;
    word-break: break-word;
}


/* --- arborists' own area ------------------------------------------------ */
.owner-page { max-width: 980px; }
.profile-form { display: flex; flex-direction: column; gap: 16px; }
.profile-form .card { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field .text-input, .inline-form .text-input { width: 100%; }
textarea.text-input { resize: vertical; line-height: 1.45; }
.inline-form { display: flex; flex-wrap: wrap; gap: 10px; }
.inline-form .text-input { flex: 1 1 240px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.form-ok { color: var(--forest-deep); font-weight: 600; }

.district-groups { display: flex; flex-direction: column; gap: 6px; }
.district-group { border: 1px solid var(--paper-3); border-radius: 10px; padding: 6px 12px; background: var(--paper); }
.district-group summary { cursor: pointer; min-height: 36px; display: flex; align-items: center; gap: 8px; font-weight: 600; }
.district-group .facet-chips { padding: 6px 0 8px; }

.choice-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.choice { display: flex; align-items: center; gap: 10px; min-height: 40px; }

.owner-status { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.owner-email { margin-left: auto; font-size: .85rem; }
.duplicate-card { margin-bottom: 16px; border-color: var(--amber); }

.managed-badge { background: var(--forest-tint); color: var(--forest-deep); margin-left: 6px; }

.review-item { border-top: 1px solid var(--paper-3); padding: 14px 0; display: flex; flex-direction: column; gap: 10px; }
.review-item:first-of-type { border-top: 0; }
.diff-new { color: var(--forest-deep); font-weight: 600; }

/* --- footer ----------------------------------------------------------- */
.site-footer {
    margin-top: auto;
    border-top: 1px solid var(--paper-3);
    background: var(--paper-2);
    font-size: .85rem;
    color: var(--ink-soft);
}

.site-footer-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 24px;
}

/* Cross-links to the sibling tree tools: a full-width line of its own that wraps link by link on a phone. */
.site-footer-projects {
    flex-basis: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 16px;
    font-size: .8rem;
    color: var(--ink-soft);
}

.site-footer-projects a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 4px;
    margin: 0 -4px;
}

/* --- blazor error ui ---------------------------------------------------- */
#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    color: #2a2620;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, .2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: .6rem 1.25rem .7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }

/* --- responsive ---------------------------------------------------------- */
@media (max-width: 960px) {
    .catalog-layout { grid-template-columns: minmax(0, 1fr); }
    .catalog-filters { position: static; display: none; }
    .catalog-filters.open { display: flex; }
    .filters-toggle, .filters-close { display: inline-flex !important; }
    .detail-layout { grid-template-columns: minmax(0, 1fr); }
    /* On a phone the contacts are what people came for. */
    .detail-side { order: -1; }
}

@media (max-width: 600px) {
    .hero-inner { padding: 32px 16px 24px; }
    .catalog, .page { padding-left: 16px; padding-right: 16px; }
    .card-grid { grid-template-columns: minmax(0, 1fr); }
    /* The count gets its own line; view switch and filters share the next one. */
    .catalog-count { flex-basis: 100%; }
    .view-toggle { margin-left: 0; }
    .catalog-map { height: 70vh; }
    .brand-name { font-size: 1.08rem; }
    .app-nav-link { padding: 10px 8px; }
    /* On a phone only Pro arboristy: the logo leads to the catalogue, O katalogu stays in the footer. */
    .app-nav-link:nth-child(1), .app-nav-link:nth-child(2) { display: none; }
    .site-footer-inner { padding: 16px; }
    .admin-logout { margin-left: 0; }
    .admin-filters .text-input { max-width: none; }
}

/* --- protected contacts ----------------------------------------------- */
/* A phone or e-mail before a person reveals it: looks like the link it becomes. */
.contact-mask {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 32px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--forest);
    font: inherit;
    cursor: pointer;
    letter-spacing: .02em;
}
.contact-mask:hover span, .contact-mask:focus-visible span { text-decoration: underline; }
.contact-mask.card-action { min-height: 40px; font-weight: 600; }


.catalog-order { color: var(--ink-soft); font-size: .9rem; }
