:root {
    --bg: #edf3fa;
    --surface: #fff;
    --ink: #111c32;
    --muted: #465773;
    --line: #cfd9e8;
    --accent: #b74400;
    --accent-dark: #943700;
    --accent-soft: #fff0e3;
    --forest: #142d51;
    --soft-green: #e7eef8;
    --navy: #102544;
    --navy-mid: #1d3c65;
    --orange: #f47706;
    --orange-text: #c54b00;
    --action: #c54b00;
    --radius: .75rem;
    --shadow: 0 3px 10px rgb(28 58 98 / 8%);
    --edge: clamp(1rem, 5.65vw, 5.5rem);
    --wrap: 80rem;
}

body { background: radial-gradient(ellipse at 45% 5%, #f9fbfe 0, transparent 58rem), var(--bg); }
.button, button { border-radius: .55rem; }
.button:not(.outline), .new-ad, .home-search button, .mast-search button {
    background: linear-gradient(115deg, #d85800 0%, #c34b00 100%);
}
.button:not(.outline):hover, .home-search button:hover, .mast-search button:hover { background: var(--accent-dark); }
.text-link, .back { color: var(--navy); }
.inner-page { padding-block: clamp(1.5rem, 3.2vw, 3rem) clamp(2.5rem, 6vw, 5rem); }
.panel, .content-sheet, .auth-view { box-shadow: var(--shadow); }
input:not([type=checkbox], [type=radio]), textarea, select { border-color: var(--line); }
:is(input, textarea)::placeholder { color: #52627a; }
.auth-visual { background: linear-gradient(0deg, #0c2346e8, #0c234625 75%), url("lokalisko/slask.webp") center / cover, var(--navy); }
.auth-visual .wordmark em { color: #ff981e; }

.mast { background: var(--surface); border: 0; box-shadow: var(--shadow); }
.mast-top { color: #fff; background: linear-gradient(105deg, var(--navy), var(--navy-mid)); overflow: hidden; }
.mast-top-inner { display: flex; align-items: stretch; justify-content: space-between; gap: 1.35rem; min-height: 1.8rem; }
.mast-top p, .mast-top a { display: inline-flex; align-items: center; gap: .35rem; font-size: .8125rem; font-weight: 750; }
.mast-top p { min-width: 0; padding-block: .4rem; line-height: 1.4; }
.mast-top :is(p, a) svg { flex: none; }
.mast-top p svg { color: #ff8b17; }
.mast-top nav { display: flex; align-items: stretch; gap: clamp(.65rem, 1.7vw, 1.3rem); position: relative; isolation: isolate; padding-inline-start: 1.5rem; }
.mast-top nav::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0 -100vw 0 -2rem;
    background: linear-gradient(90deg, #b74700, #e55800 50vw, #f47706);
    transform: skewX(-42deg);
}
.mast-top a { color: inherit; text-decoration: none; white-space: nowrap; }
.mast-top a:hover { text-decoration: underline; }
.mast-top a:focus-visible, .mast-nav a:focus-visible, .site-foot a:focus-visible, .home-hero a:focus-visible, .shortcut:focus-visible { outline-color: #ffac56; }

.mast-inner {
    display: grid;
    grid-template-columns: auto minmax(9rem, 1fr) auto;
    gap: clamp(.75rem, 3vw, 2.5rem);
    min-height: clamp(4rem, 5.5vw, 5rem);
}
.wordmark { gap: .35rem; font-size: clamp(1.55rem, 3vw, 2.36rem); font-weight: 850; letter-spacing: -.067em; line-height: 1.2; }
.brand-mark { width: clamp(1.65rem, 3.1vw, 2.45rem); height: auto; background: none; color: var(--orange); }
.brand-mark svg { width: 100%; height: auto; }
.wordmark em { color: var(--orange-text); }

.mast-search { display: flex; min-width: 0; width: 100%; max-width: 30rem; justify-self: center; }
.mast-search input { width: 100%; min-width: 0; min-height: 2.4rem; border: 1px solid var(--line); border-radius: .4rem 0 0 .4rem; padding: .35rem .75rem; background: #f5f7fb; font-size: .875rem; }
.mast-search button { min-height: 2.4rem; border-radius: 0 .4rem .4rem 0; padding: .35rem .64rem; }
.mast-tools { gap: clamp(.1rem, 1vw, .7rem); }
.mast-tools :is(.icon-link, summary) { position: relative; gap: .15rem; width: auto; min-width: 2.75rem; height: auto; min-height: 2.75rem; padding: .25rem .42rem; color: var(--navy); text-decoration: none; line-height: 1.12; }
.mast-tools :is(.icon-link, summary) span { font-size: .72rem; font-weight: 800; white-space: nowrap; }
.mast-tools .new-ad { margin-right: 0; min-height: 2.5rem; padding: .55rem .85rem; }
.mast-tools [aria-current] { background: var(--accent-soft); color: var(--accent); }
.pop-list { top: calc(100% - 2.5rem); }
.unread-badge { position: absolute; top: 0; right: .18rem; min-width: 1.05rem; padding: .13rem .18rem; border-radius: 1rem; background: var(--action); color: #fff; font-size: .63rem; text-align: center; }

.mast-nav { background: linear-gradient(100deg, #112948, #193760 65%, #112948); }
.mast-nav .primary-links { display: grid; grid-template-columns: repeat(5, minmax(max-content, 1fr)); gap: 0; margin-inline: auto; }
.mast-nav a { display: flex; justify-content: center; align-items: center; gap: .55rem; position: relative; min-height: 2.45rem; padding: .35rem .8rem; color: #fff; }
.mast-nav a + a::before { content: ""; position: absolute; left: 0; width: 1px; height: 1.05rem; background: #d5deef99; }
.mast-nav a:hover, .mast-nav a[aria-current] { color: #fff; background: #ffffff16; }
.mast-nav a:focus-visible { outline-offset: -3px; }

.front-wrap { padding-block: .9rem 1.25rem; }
.home-stage { display: grid; grid-template-columns: 1.04fr 2.53fr 1.1fr; gap: .7rem; align-items: stretch; margin-bottom: .85rem; }
.home-departments { display: grid; grid-template-rows: repeat(4, 1fr); padding: .45rem .78rem; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.home-departments a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .63rem; padding: .6rem .37rem; color: var(--ink); text-decoration: none; font-weight: 800; line-height: 1.2; }
.home-departments a + a { border-top: 1px solid #e0e7f1; }
.home-departments a:hover { color: var(--orange-text); }
.home-departments svg:last-child { color: var(--muted); }
.home-hero, .shortcut { background-color: var(--navy); background-position: center; background-size: cover; border-radius: var(--radius); color: #fff; }
.home-hero {
    display: grid;
    align-content: end;
    justify-items: start;
    gap: .75rem;
    min-height: clamp(13rem, 19vw, 17.5rem);
    padding: 1.1rem clamp(1rem, 2.2vw, 2rem);
    background-image: linear-gradient(90deg, #07192be0, #081f3970 45%, transparent 84%), url("lokalisko/slask.webp");
    background-position: center, center 51%;
}
.home-hero h1 { font-size: clamp(2rem, 3.7vw, 3.45rem); font-weight: 850; line-height: .99; max-width: 18ch; text-shadow: 0 2px 10px #0008; }
.home-hero h1 em { color: #ff8b16; font-style: normal; }
.home-hero p { display: inline-flex; align-items: center; flex-wrap: wrap; gap: .4rem; font-size: .875rem; font-weight: 750; line-height: 1.25; }
.home-hero .button, .directory-banner .button { min-height: 2.3rem; padding: .45rem .85rem; }
.home-shortcuts { display: grid; gap: .55rem; grid-template-rows: repeat(2, 1fr); min-width: 0; }
.shortcut { display: flex; align-items: end; justify-content: space-between; gap: .25rem; padding: .8rem .75rem .8rem .95rem; text-decoration: none; text-shadow: 0 2px 10px #0008; line-height: 1.03; letter-spacing: -.04em; font-size: clamp(1.15rem, 2.15vw, 1.8rem); font-weight: 850; }
.shortcut:hover { color: #fff; box-shadow: 0 0 0 2px #f47706; }
.shortcut i { display: grid; flex: none; place-items: center; width: 1.65rem; height: 1.65rem; background: #fff; color: var(--navy); border-radius: 50%; }
.stays-shortcut { background-image: linear-gradient(90deg, #091929b0, #10151b10), url("lokalisko/noclegi.webp"); }
.firms-shortcut { background-image: linear-gradient(90deg, #091929bf, #10151b16), url("lokalisko/firmy.webp"); background-position: center 48%; }

.home-search { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: end; gap: clamp(.75rem, 1.8vw, 1.55rem); padding: .85rem clamp(.8rem, 2vw, 1.5rem); }
.home-search > :not(:first-child) { margin: 0; }
.home-search label { min-width: 0; }
.home-search label > span { display: flex; align-items: center; gap: .55rem; }
.home-search label svg { color: var(--navy); }
.home-search select { min-height: 2.35rem; padding-block: .34rem; background-color: #f9fbfd; }
.home-search button { min-height: 2.65rem; white-space: nowrap; }

.front-block { margin-top: 1.1rem; }
.front-heading { margin-bottom: .58rem; display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.front-heading h2 { display: block; position: relative; padding-left: .78rem; font-size: clamp(1.14rem, 1.85vw, 1.55rem); line-height: 1.16; }
.front-heading h2::before { content: ""; position: absolute; left: 0; top: .08em; bottom: .07em; width: .28rem; background: var(--orange); border-radius: .2rem; }
.front-heading h2 em { color: var(--orange-text); font-style: normal; }
.front-heading .text-link { flex: none; font-size: .81rem; text-decoration: none; }
.front-heading .text-link:hover { text-decoration: underline; }
.tile-grid { gap: clamp(.55rem, 1vw, 1rem); }
.tile-grid.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tile { box-shadow: var(--shadow); }
.tile:hover { border-color: #99adc8; box-shadow: 0 6px 16px rgb(21 43 79 / 12%); }
.tile-photo { aspect-ratio: 1.72; background-color: #e1eaf6; }
.tile-photo img { position: absolute; inset: 0; }
.front-wrap .tile-photo img { object-fit: contain; }
.tile-copy { grid-template-rows: initial; gap: .28rem; }
.tile-copy h3 { line-height: 1.23; }
.tile-price { grid-row: auto; margin-top: .12rem; color: var(--ink); }
.compact-tile .tile-copy { padding: .58rem .65rem .64rem; gap: .19rem; }
.compact-tile .tile-copy h3 { font-size: clamp(.875rem, 1.12vw, 1rem); }
.compact-tile .tile-copy .place { font-size: .79rem; }
.compact-tile .tile-price { font-size: .92rem; }
.tile-tag { display: inline-block; width: fit-content; max-width: 100%; padding: .12rem .38rem; margin-top: .2rem; border-radius: .35rem; color: var(--navy); background: #e7eef8; font-size: .76rem; }
.tile-featured { color: #fff; background: var(--action); }
.compact-tile .tile-featured { top: .5rem; left: .5rem; padding: .22rem .38rem; font-size: .68rem; text-transform: uppercase; letter-spacing: .02em; }
.tile .save-ad { top: .3rem; right: .34rem; width: 2.1rem; height: 2.1rem; min-height: 2.1rem; background: #102544ab; border: 1px solid #ffffff56; color: #fff; }
.tile .save-ad:hover, .tile .save-ad[aria-pressed=true] { background: var(--action); }
.company-tile-media { background: repeating-radial-gradient(circle at 90% 115%, transparent 0 1.4rem, #b6c8df60 1.45rem 1.55rem, transparent 1.6rem 2.9rem), #eaf1fb; }
.company-tile-media img { object-fit: contain; padding: 1rem 1.8rem; }
.company-monogram { display: grid; place-items: center; width: 3.65rem; aspect-ratio: 1; border-radius: 50%; background: var(--navy-mid); color: #fff; font-weight: 850; font-size: 1.25rem; text-transform: uppercase; }

.directory-banner { display: grid; grid-template-columns: 44% 56%; align-items: stretch; position: relative; isolation: isolate; overflow: hidden; margin-top: 1.25rem; min-height: 12rem; background: var(--navy); color: #fff; border-radius: var(--radius); }
.directory-banner-copy { display: grid; align-content: center; justify-items: start; gap: .55rem; position: relative; padding: 1.15rem clamp(1rem, 3.2vw, 3rem); z-index: 1; }
.directory-banner-copy::before { content: ""; position: absolute; inset: 0 -1.35rem 0 0; z-index: -1; border-radius: 0 55% 55% 0 / 0 150% 150% 0; background: linear-gradient(105deg, var(--navy), var(--navy-mid)); }
.directory-banner h2 { font-size: clamp(1.65rem, 3.3vw, 3rem); font-weight: 850; line-height: 1; }
.directory-banner p { max-width: 37ch; font-size: .89rem; line-height: 1.35; }
.directory-banner img { width: 100%; height: 100%; min-height: 0; position: absolute; inset: 0 0 0 auto; max-width: 56%; object-fit: cover; object-position: center 48%; }
.popular-cities { margin-top: .9rem; }
.popular-cities .front-heading h2 { font-size: clamp(1rem, 1.45vw, 1.25rem); }
.cities { gap: .45rem; }
.cities a { padding: .3rem .62rem; border-radius: 999px; box-shadow: var(--shadow); font-size: .79rem; }

.site-foot { color: #fff; background: linear-gradient(105deg, #102544, #153154 65%, #102544); padding-block: 1rem .65rem; }
.site-foot .foot-grid { grid-template-columns: minmax(0, 1.25fr) repeat(3, minmax(0, 1fr)); gap: clamp(.9rem, 3vw, 2.7rem); }
.site-foot .wordmark { font-size: clamp(1.32rem, 2.4vw, 1.86rem); }
.site-foot .brand-mark { width: 1.75rem; }
.site-foot .wordmark em { color: #ff8b16; }
.foot-grid p { margin-top: .4rem; color: #dce7f7; font-size: .84rem; line-height: 1.4; }
.foot-grid h2 { margin-bottom: .34rem; }
.foot-grid a:not(.wordmark) { display: flex; align-items: center; gap: .45rem; color: #e4eefc; padding-block: .28rem; font-size: .875rem; }
.foot-grid a:not(.wordmark) svg { flex: none; color: #ffac56; }
.foot-bottom { display: flex; align-items: start; justify-content: space-between; flex-wrap: wrap; gap: .4rem 1rem; border-top: 1px solid #ffffff35; margin-top: .8rem; padding-top: .55rem; color: #e4eefc; font-size: .75rem; }
.foot-bottom nav { display: flex; gap: .2rem .8rem; flex-wrap: wrap; }
.foot-bottom a { color: inherit; text-decoration: none; }
.foot-bottom a:hover { text-decoration: underline; }

.browse-heading {
    min-height: 9rem;
    display: grid;
    align-content: end;
    padding: clamp(1.05rem, 2.5vw, 2.2rem);
    border-radius: var(--radius);
    color: #fff;
    background: linear-gradient(90deg, #102544f2 0%, #112948bd 54%, #11294838), url("lokalisko/slask.webp") center 49% / cover, var(--navy);
}
.browse-heading h1 { font-size: clamp(1.85rem, 4vw, 3.15rem); }
.browse-noclegi { background-image: linear-gradient(90deg, #102544f0, #11294885), url("lokalisko/noclegi.webp"); }
.browse-firmy { background-image: linear-gradient(90deg, #102544f0, #11294885), url("lokalisko/firmy.webp"); }
.browse-heading .filter-links { gap: .45rem; }
.browse-heading .filter-links a { color: #fff; background: #0a1e40bf; border-color: #fff6; }
.browse-heading .filter-links a:hover, .browse-heading .filter-links a[aria-current] { background: var(--surface); color: var(--navy); }
.browse-heading a:focus-visible { outline-color: #ffac56; }
.content-sheet { max-width: 54rem; margin-top: 0; margin-bottom: 0; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.25rem, 4vw, 3.2rem); background: var(--surface); }
.detail-heading { border-bottom: 1px solid var(--line); padding-bottom: .85rem; }
.detail-heading h1, .estate-head h1 { font-size: clamp(1.9rem, 4.6vw, 3.25rem); }
.estate-stats > strong { color: var(--ink); }
#firmy.price-department { border-color: var(--line); background: var(--surface); }
#firmy .price-icon { background: var(--soft-green); color: var(--navy); }

.page-detail:has(.firma) { background: var(--bg); }
body.page-detail:has(.firma) .site-foot { background: linear-gradient(105deg, #102544, #153154 65%, #102544); }
.inner-page:has(.firma) { width: min(var(--wrap), calc(100% - 2 * var(--edge))); padding-block: .85rem 2rem; }
.firma {
    --green: var(--navy-mid);
    --line: #cfd9e8;
    --paper: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    color: var(--ink);
    box-shadow: var(--shadow);
}
.firma h1, .firma h2, .firma-tag, .firma-services li { font-family: Manrope, sans-serif; color: var(--ink); }
.firma h1 { font-size: clamp(1.8rem, 4.25vw, 3.5rem); }
.firma-crumb span { color: var(--muted); }
.firma-logo, .firma-reviews, .firma-map { background-color: var(--soft-green); }
.firma-card { border-color: var(--line); }
.firma-cover:has(img) { background: var(--bg); }
.firma .firma-btn:not(.secondary) { color: #fff; border-color: transparent; background: var(--action); }
.firma .firma-btn:not(.secondary):hover { background: var(--accent-dark); }
.firma-welcome { background: linear-gradient(105deg, var(--navy), var(--navy-mid)); padding-block: clamp(1.35rem, 3.5vw, 3rem); }
.firma-welcome-title { font-family: Manrope, sans-serif; font-size: clamp(1.5rem, 3vw, 2.7rem); }
.firma-welcome-copy { color: #e3edfb; }
.firma-welcome-map { background: repeating-radial-gradient(circle, transparent 0 2rem, #d4e2f431 2rem 2.2rem, transparent 2.25rem 3.7rem); }
.firma-welcome-map::after { background: radial-gradient(circle, var(--navy-mid) 0 22%, #ff9323 24%); }

.messages-layout { display: grid; grid-template-columns: minmax(12rem, .85fr) minmax(0, 2fr); align-items: start; gap: 1rem; }
.messages-title { margin-bottom: 1rem; }
.conversation-list { display: grid; align-content: start; padding: .5rem; gap: .25rem; }
.conversation-list h2 { padding: .75rem; font-size: 1.1rem; }
.conversation-list a { display: grid; gap: .15rem; border-radius: .55rem; padding: .65rem .75rem; color: var(--ink); text-decoration: none; }
.conversation-list a:hover, .conversation-list [aria-current] { background: var(--soft-green); }
.conversation-list .has-unread { border-left: 3px solid var(--orange); }
.conversation-list small { color: var(--muted); }
.message-thread h2 { font-size: clamp(1.3rem, 3vw, 1.95rem); }
.message-flow { display: grid; gap: .65rem; list-style: none; padding: 0; margin: 1rem 0; }
.message-flow li { justify-self: start; max-width: min(91%, 54ch); padding: .75rem .95rem; border-radius: .9rem .9rem .9rem .2rem; background: var(--soft-green); }
.message-flow li.sent { justify-self: end; border-radius: .9rem .9rem .2rem .9rem; background: var(--accent-soft); }
.message-flow time { display: block; margin-top: .3rem; color: var(--muted); font-size: .76rem; }
.message-thread textarea { min-height: 6rem; resize: vertical; }

@media (max-width: 63rem) {
    .mast-inner { gap: .85rem; }
    .home-stage { grid-template-columns: minmax(9.5rem, 1fr) 2.25fr 1fr; }
    .home-departments a { font-size: .89rem; gap: .45rem; padding-inline: .2rem; }
    .home-departments a > svg:first-child { width: 1.22rem; }
    .home-search { gap: .65rem; }
    .home-search button { padding-inline: .65rem; }
}

@media (max-width: 49rem) {
    :root { --edge: 1rem; }
    .mast-inner { grid-template-columns: 1fr auto; gap: .45rem .7rem; padding-block: .55rem; }
    .mast-search { grid-row: 2; grid-column: 1 / -1; max-width: none; }
    .mast-top-inner { display: grid; gap: 0; }
    .mast-top p { align-items: flex-start; padding-block: .55rem; }
    .mast-top p svg { margin-block-start: .1rem; }
    .mast-top nav { flex-wrap: wrap; gap: 0 1rem; padding-inline-start: 0; border-top: 1px solid #ffffff35; }
    .mast-top nav::before { display: none; }
    .mast-top a { min-height: 2.5rem; gap: .3rem; }
    .mast-nav .primary-links { grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: stretch; }
    .mast-nav a { min-height: 2.75rem; padding-inline: .4rem; font-size: .8rem; text-align: center; }
    .pop-list { top: 4.35rem; }
    .home-stage { grid-template-columns: 1fr minmax(9rem, .39fr); }
    .home-departments { grid-column: 1 / -1; grid-row: 2; grid-template: auto / repeat(4, minmax(0, 1fr)); padding: .3rem; }
    .home-departments a { grid-template-columns: auto minmax(0, 1fr); padding: .55rem .45rem; }
    .home-departments a + a { border-top: 0; border-left: 1px solid var(--line); }
    .home-departments a > svg:last-child { display: none; }
    .home-hero { min-height: 13.2rem; }
    .home-search { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tile-grid.five, .tile-grid.four { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .site-foot .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 40rem) {
    .mast-nav .primary-links { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .mast-nav a { grid-column: span 2; gap: .35rem; white-space: normal; }
    .mast-nav a:nth-last-child(-n+2) { grid-column: span 3; border-top: 1px solid #ffffff35; }
    .mast-nav a:nth-child(4)::before { display: none; }
    .mast-nav a svg { flex: none; width: 1rem; }
}

@media (max-width: 34rem) {
    .mast-top nav { justify-content: space-between; gap: 0 .45rem; }
    .mast .wordmark { font-size: clamp(1.2rem, 5.6vw, 1.5rem); }
    .mast-search input { font-size: 1rem; }
    .mast-tools { gap: 0; }
    .mast-tools :is(.icon-link, summary) { display: grid; min-width: 2.45rem; padding: .24rem; }
    .mast-tools :is(.icon-link, summary) span, .mast-tools .new-ad > span { display: none; }
    .mast-tools .new-ad { width: 2.45rem; min-width: 2.45rem; padding: .3rem; }
    .mast-nav a { flex-direction: column; gap: .2rem; }
    .mast-nav a:nth-last-child(-n+2) { flex-direction: row; gap: .35rem; }
    .home-stage { grid-template-columns: minmax(0, 1fr); gap: .55rem; }
    .home-shortcuts { grid-row: 2; grid-template: auto / repeat(2, minmax(0, 1fr)); }
    .shortcut { min-height: 5.5rem; }
    .home-departments { grid-row: 3; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-departments a:nth-child(3) { border-left: 0; }
    .home-departments a:nth-child(n+3) { border-top: 1px solid var(--line); }
    .front-heading .text-link { max-width: 9ch; text-align: end; line-height: 1.25; }
    .tile-grid.five, .tile-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tile .save-ad { width: 2.4rem; height: 2.4rem; min-height: 2.4rem; }
    .directory-banner { grid-template-columns: 1fr; }
    .directory-banner-copy::before { inset: 0; border-radius: 0; }
    .directory-banner img { position: static; max-width: none; height: 8rem; }
    .foot-grid a:not(.wordmark) { min-height: 2.5rem; }
    .messages-layout { grid-template-columns: minmax(0, 1fr); }
    .conversation-list { max-height: 17rem; overflow-y: auto; }
}

@media (max-width: 22rem) {
    .home-search { grid-template-columns: minmax(0, 1fr); }
    .mast-tools :is(.icon-link, summary) { min-width: 2rem; }
}

.conversation-empty { margin: .15rem .75rem .65rem; color: var(--muted); }
.message-link { width: fit-content; }
.content-actions { display: flex; flex-wrap: wrap; gap: .65rem; padding-top: .5rem; }
.active-city { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; color: var(--navy); font-size: .9rem; }
.active-city a { margin-inline-start: .35rem; }

.market-results { display: grid; gap: .8rem; }
.market-results .tile > a { display: grid; grid-template-columns: clamp(11rem, 25%, 18rem) minmax(0, 1fr); padding: .65rem; }
.market-results .tile-photo { width: 100%; min-height: 8.4rem; border-radius: .5rem; background-color: #f0f3f6; }
.market-results .tile-photo img { object-fit: contain; }
.market-results .tile-copy { min-width: 0; padding: .5rem 3.25rem .5rem 1.2rem; display: flex; flex-direction: column; gap: .4rem; overflow-wrap: anywhere; }
.market-results .tile-copy h3 { font-size: clamp(1.05rem, 2vw, 1.4rem); }
.market-results .tile-price { order: -1; color: var(--navy); font-size: 1.28rem; }
.market-results .place { margin-top: auto; }
.market-path { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; margin-bottom: 1rem; color: var(--muted); font-size: .88rem; }
.market-offer { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(17rem, 1fr); grid-template-areas: "photo summary" "description summary"; gap: 1rem; align-items: start; }
.offer-photo { grid-area: photo; height: clamp(20rem, 38vw, 33rem); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #f3f5f7; color: var(--muted); display: grid; align-content: center; justify-items: center; gap: .65rem; }
.offer-photo.has-photo { display: block; }
.offer-photo a, .offer-photo img { display: block; width: 100%; height: 100%; }
.offer-photo a { cursor: zoom-in; }
.offer-photo img { object-fit: contain; }
.market-offer .panel { min-width: 0; padding: clamp(1rem, 2.8vw, 2rem); overflow-wrap: anywhere; }
.offer-summary { grid-area: summary; display: grid; gap: .8rem; }
.offer-meta { color: var(--muted); font-size: .85rem; }
.offer-summary h1 { font-size: clamp(1.5rem, 3vw, 2.3rem); line-height: 1.13; margin: 0; }
.offer-price { color: var(--navy); font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.2; }
.offer-contact { border-top: 1px solid var(--line); padding-top: 1rem; display: grid; gap: .8rem; }
.market-offer h2 { font-size: 1.25rem; margin: 0; }
.offer-description { grid-area: description; display: grid; gap: 1rem; }
.offer-details { margin: 0; }
.offer-details div { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); padding: .65rem 0; }
.offer-details dd { margin: 0; font-weight: 700; text-align: right; }
@media (max-width: 46rem) {
    .market-offer { grid-template-columns: minmax(0, 1fr); grid-template-areas: "photo" "summary" "description"; }
    .offer-photo { height: clamp(14rem, 72vw, 24rem); }
    .market-results .tile > a { grid-template-columns: 35% minmax(0, 1fr); padding: .45rem; }
    .market-results .tile-photo { height: 100%; aspect-ratio: auto; }
    .market-results .tile-copy { padding: .25rem .35rem .25rem .7rem; }
    .market-results .tile-price { padding-right: 2.6rem; font-size: 1.05rem; }
    .market-results .tile-copy h3 { padding-right: 1rem; }
    .market-results .tile-category { max-width: calc(100% - .6rem); left: .3rem; top: .3rem; font-size: .7rem; }
}

/* The photo sets the height, including when the original is a portrait. */
.offer-photo.has-photo, .offer-photo.has-photo :is(a,img) { height: auto; }
.offer-photo.has-photo img { width: 100%; }
.estate .estate-gallery img { object-fit: contain; }
:is(.front-wrap,.market-results) .tile-photo:not(.company-tile-media):has(img) {
    height: auto; aspect-ratio: auto; align-self: center; width: 100%;
}
:is(.front-wrap,.market-results) .tile-photo:not(.company-tile-media) img {
    position: static; display: block; width: 100%; height: auto; object-fit: contain;
}

.contact-reveal { overflow: hidden; border: 1px solid var(--line); border-radius: .7rem; background: var(--surface); color: var(--ink); }
.contact-reveal + .contact-reveal { margin-block-start: .45rem; }
.contact-reveal summary { display: flex; align-items: center; gap: .6rem; padding: .8rem 1rem; min-height: 46px; color: var(--navy); cursor: pointer; font-weight: 700; list-style: none; }
.contact-reveal summary::-webkit-details-marker { display: none; }
.contact-reveal summary:hover { background: var(--soft-green); }
.contact-reveal summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.contact-mask { margin-left: auto; color: var(--muted); letter-spacing: .12em; font-size: .8rem; }
.contact-reveal[open] summary { background: var(--soft-green); }
.contact-reveal[open] .contact-mask { visibility: hidden; }
.contact-reveal > div { padding: .8rem 1rem; overflow-wrap: anywhere; }
.contact-reveal > div a { color: var(--navy); text-decoration: underline; text-underline-offset: .18em; }

.firma .company-description, .firma #wpisy { padding: clamp(1.1rem, 3vw, 2rem); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.firma .company-description { border-top: 4px solid var(--orange); }
.company-description .firma-text { max-width: 68ch; line-height: 1.8; overflow-wrap: anywhere; }
.company-offers { display: grid; gap: .65rem; }
.company-offers article a { display: grid; grid-template-columns: clamp(5rem, 20%, 9rem) minmax(0, 1fr); gap: 1rem; padding: .65rem; align-items: center; border: 1px solid var(--line); border-radius: .65rem; color: var(--ink); text-decoration: none; }
.company-offers article a:hover { border-color: var(--navy); }
.company-offer-photo { display: grid; place-items: center; aspect-ratio: 4/3; background: var(--soft-green); border-radius: .4rem; overflow: hidden; }
.company-offer-photo img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.company-offer-copy { display: grid; gap: .3rem; overflow-wrap: anywhere; }
.company-offer-copy small { color: var(--muted); }
.company-offer-copy b { color: var(--navy); }
