:root {
  color-scheme: light;
  --paper: #faf9f6;
  --white: #fff;
  --ink: #182d2a;
  --green: #175a47;
  --green-dark: #124333;
  --pale: #e8f0e9;
  --muted: #56645d;
  --line: #e2e5dd;
  --max: 1280px;
  --radius: 20px;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: default; opacity: .6; }
a { color: var(--green); }
img { display: block; max-width: 100%; }
h1, h2, h3, p, figure { margin: 0; }
button, input, textarea, select { border-radius: 10px; }
input, textarea, select { padding: .65rem .8rem; border: 1px solid var(--line); background: var(--white); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--green); }
:focus-visible { outline: 3px solid #188877; outline-offset: 3px; }
[hidden] { display: none !important; }

.sr-only, .skip-link:not(:focus) {
  position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.skip-link:focus { position: fixed; z-index: 20; top: .75rem; left: .75rem; padding: .75rem; background: var(--white); }
.icon { width: 20px; height: 20px; flex: 0 0 auto; vertical-align: middle; }
.muted { color: var(--muted); }
.warning { margin: 1rem 0; color: #795214; }
.stack { display: grid; gap: 1rem; }
.row { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; }
.panel {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1rem, 3vw, 1.6rem);
}
.button {
  display: inline-flex; gap: .55rem; align-items: center; justify-content: center;
  min-height: 44px; padding: .55rem .9rem; border: 1px solid var(--line);
  border-radius: 11px; background: var(--white); color: var(--ink); text-decoration: none;
  font-size: .88rem; font-weight: 650; line-height: 1.3; text-align: center;
}
.button:hover { border-color: #9eb3a5; background: #f3f7f2; }
.button[aria-pressed="true"], .button.selected { background: var(--pale); color: var(--green-dark); border-color: #c7ddcf; }
.button.primary { border-color: var(--green); background: var(--green); color: var(--white); }
.button.primary:hover { background: var(--green-dark); }
.icon-button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; }
.action-link { display: inline-flex; align-items: center; min-height: 44px; gap: .5rem; font-weight: 650; text-underline-offset: .25em; }

.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner, .site-main, .footer-inner { width: min(calc(100% - 92px), var(--max)); margin-inline: auto; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 1.1rem; }
.brand { display: inline-flex; gap: .6rem; align-items: center; text-decoration: none; color: #103769; }
.brand img { width: 40px; height: 40px; padding: 2px; object-fit: cover; border-radius: 11px; }
.brand span { letter-spacing: .105em; font-size: 1.25rem; font-weight: 850; }
.primary-nav, .header-actions { display: flex; align-items: center; gap: .65rem; }
.primary-nav a {
  min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
  padding: .45rem .95rem; color: var(--muted); border-radius: 10px; text-decoration: none; font-size: .9rem; font-weight: 650;
}
.primary-nav a:hover, .primary-nav a[aria-current="page"] { color: var(--green-dark); background: var(--pale); }
.primary-nav .icon { display: none; }
.lang-control { position: relative; display: flex; align-items: center; }
.lang-control .icon { position: absolute; inset-inline-start: .6rem; pointer-events: none; width: 17px; height: 17px; color: var(--green-dark); }
.lang-control select { min-height: 44px; width: 7rem; padding-inline: 2rem .3rem; font-size: .85rem; font-weight: 650; }
.header-actions .button { color: var(--green-dark); }

.site-main { min-height: calc(100vh - 175px); padding-block: 32px 64px; }
.hero { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: clamp(1.4rem, 3.1vw, 3.5rem); }
.hero-copy { min-width: 0; padding-block: .35rem; }
.eyebrow { display: inline-flex; align-items: center; gap: .35rem; color: var(--green); font-weight: 725; font-size: .84rem; letter-spacing: .025em; }
.eyebrow .icon { width: 17px; height: 17px; }
.headline {
  font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.8rem, 5.05vw, 5.2rem);
  font-weight: 500; line-height: .99; letter-spacing: -.055em; margin: 16px 0 18px;
}
.headline em { display: block; font-weight: 500; color: var(--green); }
.hero-intro, .page-intro > p { color: var(--muted); font-size: 1rem; max-width: 42ch; }
.hero-media { position: relative; overflow: hidden; border-radius: 22px; background: #dad9ce; }
.hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-credit {
  position: absolute; right: 12px; bottom: 12px; max-width: calc(100% - 24px);
  color: #fff; background: #172820e8; border-radius: 10px; text-decoration: none;
  font-size: .78rem; font-weight: 650; padding: .55rem .75rem; min-height: 44px;
  display: flex; align-items: center; gap: .4rem;
}
.hero-credit .icon { width: 15px; height: 15px; }
.search-form {
  display: flex; align-items: center; padding: 4px; gap: .15rem; margin-top: 1.5rem;
  min-height: 57px; max-width: 36rem; border: 1px solid #ced8ce; border-radius: 13px; background: var(--white);
}
.search-form > .icon { margin-inline: .65rem .15rem; color: var(--green); }
.search-form input { border: 0; min-width: 0; flex: 1; padding-inline: .35rem; min-height: 44px; background: transparent; }
.search-form .button { padding-inline: 1.05rem; }

.filter-panel {
  display: block; container-type: inline-size; margin-block: 1rem;
  padding: .65rem 1rem .8rem; border: 1px solid #cfddd2; border-radius: 16px; background: #f0f5ef;
}
.hero .filter-panel { margin-bottom: 0; }
.filter-footer { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-block-start: .3rem; }
.filter-reset { border-color: transparent; background: transparent; color: var(--green-dark); padding-inline: .55rem; }
.filter-reset:hover { border-color: transparent; background: var(--pale); }
.filter-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: .65rem; }
.filter-fields label { display: grid; gap: .25rem; min-width: 0; font-weight: 650; font-size: .84rem; overflow-wrap: break-word; }
.filter-fields input, .filter-fields select, .filter-near { width: 100%; min-width: 0; min-height: 44px; border-color: #849789; }
.filter-fields input, .filter-fields select { padding: .55rem .55rem; font-size: 1rem; font-weight: 450; }
.filter-fields input[aria-invalid="true"] { border-color: #ab483b; }
.filter-fields :is(input, select) { scroll-margin-block: .5rem; }
.filter-near { justify-content: flex-start; text-align: start; }
.filter-near .icon { width: 17px; height: 17px; }
.filter-error, .filter-status, .filter-summary { font-size: .84rem; }
.filter-error, .filter-status { margin-block-start: .55rem; }
.filter-error { color: #922e23; }
.filter-status { color: var(--muted); }
.filter-status:empty { margin-block-start: 0; }
.filter-summary { color: var(--green-dark); font-weight: 650; }
.catalog-results { margin-top: 1.6rem; }
.section-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.11rem; }
.section-head h2 { font-family: Georgia, serif; font-size: clamp(1.75rem, 3.1vw, 2.4rem); letter-spacing: -.025em; font-weight: 500; }
.section-head .button { flex: 0 0 auto; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.85rem, 1.8vw, 1.5rem); }
.place-card { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: clip; background: var(--white); }
.place-card:hover { border-color: #a4b8aa; }
.card-cover { display: block; color: var(--green); background: var(--pale); overflow: hidden; }
.card-cover img, .card-placeholder { width: 100%; aspect-ratio: 1.78; height: auto; object-fit: cover; }
.card-placeholder { display: grid; place-items: center; }
.card-placeholder .icon { width: 36px; height: 36px; }
.card-favorite { position: absolute; top: 10px; right: 10px; z-index: 1; border-radius: 50%; color: var(--green-dark); }
.save[aria-pressed="true"] .icon { fill: currentColor; }
.card-body { padding: .86rem 1rem 1rem; flex: 1; }
.card-kind { display: flex; flex-wrap: wrap; gap: .25rem .6rem; align-items: center; color: var(--green); font-size: .77rem; font-weight: 700; }
.card-price { color: var(--green-dark); }
.card-body h3 { font-size: clamp(1rem, 1.7vw, 1.2rem); line-height: 1.25; margin-block: .2rem .5rem; overflow-wrap: anywhere; }
.card-body h3 a { text-decoration: none; color: var(--ink); }
.card-body h3 a:hover { text-decoration: underline; text-underline-offset: .2em; }
.card-address { color: var(--muted); display: flex; align-items: baseline; gap: .32rem; font-size: .82rem; }
.card-address .icon { width: 14px; height: 14px; align-self: flex-start; margin-top: .12rem; }
.card-meta { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; margin-top: .5rem; color: var(--green); font-size: .77rem; }
.catalog-actions { margin-top: 1.5rem; text-align: center; }
.empty, .initial { padding: 2.4rem 1rem; text-align: center; }
.empty h2, .empty h3 { margin-bottom: .3rem; }
.empty .button { margin-top: .85rem; }
.page-intro { padding-block: .8rem 0; }
.page-intro .headline { font-size: clamp(2.45rem, 5vw, 4rem); }
.inner-page { max-width: 930px; margin-inline: auto; }
.random-panel { display: grid; gap: 1rem; justify-items: start; }
.random-result { max-width: 32rem; width: 100%; }
.random-result:empty { display: none; }

.detail-back { margin-bottom: .7rem; }
.detail-top { display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(1rem, 4vw, 3.4rem); align-items: center; margin-bottom: 2rem; }
.detail-cover { border: 0; padding: 0; overflow: hidden; border-radius: var(--radius); background: var(--pale); color: var(--green); width: 100%; }
.detail-cover img { width: 100%; aspect-ratio: 1.55; object-fit: cover; }
.detail-title { font-family: Georgia, serif; font-size: clamp(2rem, 4vw, 4.4rem); font-weight: 500; line-height: 1.05; letter-spacing: -.04em; margin-block: .55rem; overflow-wrap: anywhere; }
.detail-summary { margin-block: .8rem 1rem; }
.detail-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 1rem; align-items: start; }
.detail-grid h2 { font-size: 1.25rem; }
.detail-grid p, .detail-grid ul { overflow-wrap: anywhere; }
.source-list, .field-list { padding-inline-start: 1.2rem; margin: .5rem 0 0; }
.source-list li + li, .field-list li + li { margin-top: .4rem; }
.source-meta { font-size: .85rem; color: var(--muted); }
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.photo-grid button { padding: 0; border: 0; overflow: hidden; background: var(--pale); }
.photo-grid img { width: 100%; aspect-ratio: 1.25; object-fit: cover; }
.gallery-figure img { max-height: min(64vh, 720px); margin: auto; object-fit: contain; border-radius: 10px; }
.gallery-figure figcaption { margin-top: .7rem; color: var(--muted); font-size: .9rem; }
.gallery-nav { justify-content: space-between; margin-top: .75rem; }
.map { height: clamp(360px, 60vh, 630px); background: var(--pale); border-radius: var(--radius); z-index: 0; }
.map-list { margin-top: 1rem; }
.panel-body { padding-block: .7rem; }
.leaflet-marker-icon.tamdi-pin { display: grid; place-items: center; background: var(--green); color: #fff; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 2px 5px #0004; }
.leaflet-marker-icon.tamdi-pin .icon { width: 15px; height: 15px; pointer-events: none; }
.leaflet-popup-content a { font-weight: 700; }

.dialog { width: min(calc(100% - 1.5rem), 560px); max-height: calc(100dvh - 1.5rem); margin: auto; border: 1px solid var(--line); border-radius: 20px; padding: clamp(1rem, 3vw, 1.55rem); color: var(--ink); box-shadow: 0 7px 35px #0e2a2633; }
.dialog::backdrop { background: #10251f80; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: 1rem; }
.dialog-head h2 { font-size: 1.4rem; }
.gallery-dialog { width: min(calc(100% - 1.5rem), 970px); }
.notice { position: fixed; z-index: 30; inset-inline-end: 1rem; bottom: 1rem; max-width: min(32rem, calc(100% - 2rem)); padding: .8rem 1rem; background: var(--ink); color: var(--white); border-radius: 12px; box-shadow: 0 3px 12px #0003; }
.notice:empty { padding: 0; box-shadow: none; }
.site-footer { border-top: 1px solid var(--line); background: var(--white); }
.footer-inner { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem 1rem; justify-content: space-between; padding-block: .9rem; color: var(--muted); font-size: .85rem; }
.footer-inner a { min-height: 44px; display: inline-flex; align-items: center; }

@container (min-width: 30rem) {
  .filter-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@container (min-width: 63rem) {
  .filter-fields { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (max-width: 920px) {
  .header-inner, .site-main, .footer-inner { width: min(calc(100% - 44px), var(--max)); }
  .primary-nav { gap: .2rem; }
  .primary-nav a { padding-inline: .65rem; }
  .hero { gap: 1.4rem; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  html { scroll-padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .header-inner, .site-main, .footer-inner { width: calc(100% - 28px); }
  .header-inner { min-height: 62px; }
  .header-actions { gap: .4rem; }
  .header-actions .button { width: 44px; }
  .brand img { width: 35px; height: 35px; }
  .brand span { font-size: 1.02rem; }
  .primary-nav {
    position: fixed; z-index: 10; inset: auto 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 5px 8px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line);
    background: var(--white); gap: .25rem;
  }
  .primary-nav a { min-height: 49px; flex-direction: column; gap: .13rem; padding-inline: .1rem; font-size: .68rem; overflow-wrap: anywhere; text-align: center; }
  .primary-nav .icon { display: block; width: 19px; height: 19px; }
  .site-main { padding-block: 16px 33px; }
  .hero { grid-template-columns: 1fr; gap: .75rem; }
  .hero-copy { padding-block: .4rem; }
  .hero-copy h1 { margin-block: .55rem .7rem; }
  .hero-intro { font-size: .92rem; }
  .hero-media { min-height: clamp(126px, 32vw, 205px); }
  .search-form { margin-top: 1rem; }
  .filter-panel { padding-inline: .75rem; }
  .catalog-results { margin-top: 1rem; }
  .section-head { margin-bottom: .65rem; }
  .card-grid { gap: .6rem; }
  .card-body { padding: .58rem .6rem .75rem; }
  .card-kind, .card-address { font-size: .72rem; }
  .card-favorite { top: 5px; right: 5px; }
  .detail-top, .detail-grid { grid-template-columns: 1fr; }
  .detail-top { margin-bottom: 1rem; }
  .site-footer { padding-bottom: calc(61px + env(safe-area-inset-bottom)); }
  .notice { bottom: calc(67px + env(safe-area-inset-bottom)); }
}

@media (max-width: 350px) {
  .card-grid { grid-template-columns: 1fr; }
  .lang-control select { width: 6.4rem; }
}
