:root {
  --ink: #15201f;
  --muted: #65706c;
  --line: #d7ded8;
  --paper: #e9efea;
  --panel: #ffffff;
  --panel-soft: #f7faf7;
  --teal: #0e6f77;
  --teal-dark: #173332;
  --blue: #1f5f88;
  --terracotta: #b44a2b;
  --orange: #d86d2f;
  --sun: #e5b94c;
  --rose: #c8374f;
  --green: #567a3a;
  --shadow: 0 18px 44px rgba(21, 32, 31, 0.12);
  --shadow-soft: 0 10px 26px rgba(21, 32, 31, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0) 460px),
    var(--paper);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.45;
}

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

a {
  color: inherit;
}

.file-mode-notice {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 10px clamp(16px, 4vw, 48px);
  background: #fff2b8;
  color: #713f12;
  font-size: 0.92rem;
  font-weight: 750;
  text-align: center;
}

.file-mode-notice a {
  color: #9a3412;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.hero-nav {
  position: absolute;
  top: clamp(14px, 3vw, 30px);
  right: clamp(14px, 4vw, 48px);
  left: clamp(14px, 4vw, 48px);
  z-index: 2;
  justify-content: flex-end;
}

.nav a,
button,
.primary-button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  font-weight: 750;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.nav a {
  color: #c60b1e;
  font-family: "Bodoni 72", Didot, "Baskerville", Georgia, serif;
  font-size: 1.08rem;
  font-style: italic;
  font-weight: 900;
}

.nav.hero-nav a {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(17, 40, 39, 0.48);
  color: #ffffff;
  box-shadow: 0 10px 28px rgba(12, 26, 31, 0.18);
  backdrop-filter: blur(14px);
}

.nav.hero-nav a:hover {
  background: rgba(255, 255, 255, 0.2);
}

.nav a,
.primary-button {
  display: inline-flex;
  align-items: center;
}

.primary-button {
  border-color: var(--teal);
  background: var(--teal);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(14, 111, 119, 0.18);
}

button:hover,
.primary-button:hover,
.nav a:hover {
  transform: translateY(-1px);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(229, 185, 76, 0.72);
  outline-offset: 2px;
}

main {
  width: min(1540px, 100%);
  margin: 0 auto;
  padding-bottom: 32px;
}

.hero {
  position: relative;
  display: grid;
  min-height: clamp(500px, 72vh, 690px);
  overflow: hidden;
  color: #ffffff;
  isolation: isolate;
}

.hero::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  z-index: -1;
  height: 220px;
  background: linear-gradient(180deg, rgba(233, 239, 234, 0), rgba(233, 239, 234, 0.7) 54%, var(--paper) 100%);
  content: "";
  pointer-events: none;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(14, 29, 29, 0.82), rgba(14, 29, 29, 0.42) 42%, rgba(14, 29, 29, 0.1)),
    linear-gradient(135deg, rgba(180, 74, 43, 0.12), rgba(229, 185, 76, 0.09), rgba(14, 111, 119, 0.08)),
    url("./assets/spanish-coast-hero.jpg") center/cover;
}

.hero-content {
  width: min(760px, calc(100% - 32px));
  align-self: center;
  margin-left: clamp(16px, 7vw, 92px);
  padding-bottom: 60px;
}

.eyebrow,
.label {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #d8fff8;
}

.hero-flags {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  font-size: clamp(2.1rem, 4.2vw, 4rem);
  line-height: 1;
  text-shadow: 0 14px 34px rgba(23, 32, 38, 0.38);
}

.hero-flags span {
  display: block;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 16px;
  font-size: clamp(2.8rem, 7.5vw, 6.4rem);
  line-height: 0.9;
  max-width: 12ch;
  overflow-wrap: anywhere;
}

.hero-script {
  display: block;
  font-family: "Cinzel", "Trajan Pro", "Times New Roman", Georgia, serif;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  text-shadow: 0 2px 0 rgba(23, 32, 38, 0.12), 0 18px 38px rgba(23, 32, 38, 0.45);
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.38rem, 2.6vw, 2.15rem);
}

h3 {
  margin-bottom: 8px;
  font-size: 1.08rem;
}

.section-heading,
.control-head,
.card-top,
.metric-row,
.vote-row,
.card-footer,
.country-line {
  display: flex;
  align-items: center;
}

.section-heading p,
.card-footer p,
.weather-note {
  margin-bottom: 0;
  color: var(--muted);
}

.control-band,
.ranking-band,
.map-band,
.tip-band,
.private-band,
.country-section {
  width: min(1480px, calc(100% - 28px));
  margin: 0 auto 30px;
}

.control-band {
  position: relative;
  z-index: 2;
  margin-top: -72px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(29, 61, 58, 0.98), rgba(18, 43, 43, 0.98)),
    var(--teal-dark);
  color: #f8fbf8;
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 48px rgba(21, 32, 31, 0.2);
}

.ranking-band,
.map-band,
.tip-band,
.private-band,
.country-section {
  padding-top: 4px;
}

.control-head,
.section-heading {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.control-head {
  margin-bottom: 12px;
}

.control-head h2,
.control-band .eyebrow {
  color: #ffffff;
}

.control-head h2 {
  font-size: clamp(1.22rem, 2vw, 1.7rem);
}

.control-head .eyebrow {
  color: rgba(255, 255, 255, 0.66);
}

.control-head button {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(105px, 1fr));
  gap: 9px 10px;
}

.filter-section-title {
  display: flex;
  align-items: center;
  min-height: 42px;
  margin: 0;
  padding-left: 0;
  color: #f3c66d;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

label {
  display: grid;
  gap: 5px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 400;
}

.control-band label,
.control-band legend {
  color: rgba(255, 255, 255, 0.86);
}

input[type="range"] {
  width: 100%;
}

input[type="text"],
input[type="url"],
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fbfcfc;
  color: var(--ink);
}

.control-band input[type="text"],
.control-band input[type="url"],
.control-band select,
.control-band textarea {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.92);
}

textarea {
  resize: vertical;
}

.filter-group {
  min-width: 0;
  border: 0;
  padding: 0;
  margin: 0;
}

.filter-group legend {
  margin-bottom: 5px;
  font-size: 0.82rem;
  font-weight: 400;
}

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

.radio-row label {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 0 8px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
}

.radio-row input {
  accent-color: var(--sun);
}

input[type="range"] {
  accent-color: var(--sun);
}

output {
  color: #f3c66d;
  font-weight: 500;
}

.style-filter {
  grid-column: span 1;
}

.slider-scale {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.72rem;
  font-weight: 400;
}

.toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 11px;
}

.toggle-row label {
  display: inline-flex;
  min-height: 31px;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 0 9px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 400;
}

.online-search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-top: 11px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 11px;
  background: rgba(255, 255, 255, 0.08);
}

.online-search-panel p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.82rem;
}

.online-search-panel strong {
  color: #ffffff;
  font-weight: 500;
}

.search-status {
  grid-column: 1 / -1;
}

.search-status a {
  color: #f3c66d;
  font-weight: 850;
}

.online-results {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-height: 280px;
  overflow: auto;
  padding-right: 4px;
}

.online-result-group {
  display: grid;
  gap: 10px;
  align-content: start;
}

.online-result-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.92);
}

.online-result-group-head strong {
  color: var(--ink);
}

.online-result-group-head span {
  color: var(--muted);
  font-size: 0.84rem;
}

.online-result-list {
  display: grid;
  gap: 10px;
}

.online-result-card {
  display: grid;
  gap: 8px;
  align-content: space-between;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 24px rgba(21, 32, 31, 0.08);
}

.online-result-card h3 {
  margin: 4px 0 4px;
  font-size: 1rem;
}

.online-result-card p {
  margin-bottom: 0;
  line-height: 1.4;
}

.online-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.online-result-actions button {
  min-height: 38px;
}

.ranking-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.rank-tile {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(92px, 1.2fr);
  gap: 10px;
  min-height: 164px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  padding: 10px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.rank-copy {
  display: grid;
  align-content: space-between;
  gap: 8px;
  min-width: 0;
}

.rank-score {
  color: var(--teal);
  font-size: 1.6rem;
  font-weight: 950;
}

.rank-photo {
  position: relative;
  min-height: 136px;
  overflow: hidden;
  border-radius: 7px;
  background: #dbe4e2;
}

.rank-photo img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 136px;
  object-fit: cover;
}

.rank-photo strong {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 28px 9px 8px;
  background: linear-gradient(0deg, rgba(23, 32, 38, 0.9), rgba(23, 32, 38, 0));
  color: #ffffff;
  font-size: 0.82rem;
  line-height: 1.15;
}

.map-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.map-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
}

.map-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.map-head strong {
  color: #c60b1e;
  font-family: "Bodoni 72", Didot, "Baskerville", Georgia, serif;
  font-size: 1.38rem;
  font-style: italic;
  font-weight: 950;
}

.map-head span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 850;
}

.villa-map {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  border: 1px solid #c8d8df;
  border-radius: 8px;
  background: #74bfdc;
}

.villa-map.leaflet-map {
  background: #dceee8;
}

.villa-map.leaflet-map .leaflet-container,
.villa-map.leaflet-map .leaflet-pane {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.villa-map.leaflet-map .leaflet-control-zoom a {
  color: var(--ink);
  font-weight: 900;
}

.villa-map.leaflet-map .leaflet-control-attribution {
  font-size: 0.62rem;
}

.villa-marker {
  display: grid;
  place-items: center;
  border: 3px solid #ffffff;
  border-radius: 999px;
  background: #c60b1e;
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(23, 32, 38, 0.3);
  font-size: 0.86rem;
  font-weight: 950;
}

.villa-marker.active {
  background: var(--teal);
}

.villa-marker span {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
}

.villa-map::before,
.villa-map::after {
  display: none;
}

.map-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.map-land,
.map-island {
  filter: drop-shadow(0 18px 20px rgba(23, 32, 38, 0.22));
  stroke: rgba(23, 32, 38, 0.18);
  stroke-width: 3;
}

.map-coast {
  fill: none;
  stroke: rgba(255, 255, 255, 0.86);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 5;
}

.map-neighbour {
  fill: rgba(255, 255, 255, 0.28);
  stroke: rgba(255, 255, 255, 0.36);
  stroke-width: 2;
}

.map-region-line {
  fill: none;
  stroke: rgba(116, 77, 25, 0.28);
  stroke-dasharray: 9 8;
  stroke-linecap: round;
  stroke-width: 2.4;
}

.map-label {
  fill: rgba(23, 32, 38, 0.62);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 25px;
  font-weight: 900;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.68);
  stroke-width: 5px;
}

.map-label.major {
  fill: rgba(23, 32, 38, 0.76);
  font-family: "Bodoni 72", Didot, "Baskerville", Georgia, serif;
  font-size: 50px;
  font-style: italic;
}

.map-label.small {
  fill: rgba(23, 32, 38, 0.42);
  font-size: 21px;
}

.map-label.sea {
  fill: rgba(255, 255, 255, 0.78);
  font-size: 22px;
  stroke: rgba(35, 120, 170, 0.28);
  stroke-width: 4px;
}

.map-dot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 2;
  display: grid;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  place-items: center;
  border: 3px solid #ffffff;
  border-radius: 999px;
  padding: 0;
  background: #c60b1e;
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(23, 32, 38, 0.28);
  font-size: 0.86rem;
  font-weight: 950;
  transform: translate(-50%, -50%);
}

.map-dot:hover,
.map-dot.active {
  background: var(--teal);
  transform: translate(-50%, -50%) scale(1.12);
}

.map-dot::after {
  position: absolute;
  inset: -8px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: inherit;
  content: "";
  opacity: 0;
}

.map-dot.active::after {
  opacity: 1;
}

.map-preview {
  display: grid;
  grid-template-columns: 142px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 104px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel-soft);
}

.map-preview img {
  display: block;
  width: 100%;
  height: 104px;
  object-fit: cover;
}

.map-preview div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 12px 10px 0;
}

.map-preview strong,
.map-preview span,
.map-preview small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-preview strong {
  color: var(--ink);
  font-size: 0.94rem;
}

.map-preview span,
.map-preview small {
  color: var(--muted);
  font-size: 0.82rem;
}

.map-empty {
  min-height: 104px;
  border: 0;
  border-radius: 0;
}

.tip-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 0.8fr);
  gap: 14px;
  align-items: stretch;
  margin-bottom: 14px;
}

.tip-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-soft);
}

.tip-url,
.tip-note {
  grid-column: 1 / -1;
}

.tip-form .primary-button {
  width: fit-content;
}

.tip-explainer {
  display: grid;
  align-content: center;
  border: 1px solid rgba(14, 111, 119, 0.18);
  border-radius: 8px;
  padding: 18px;
  background: linear-gradient(135deg, rgba(14, 111, 119, 0.12), rgba(229, 185, 76, 0.13));
  color: var(--teal-dark);
}

.tip-explainer p {
  margin-bottom: 0;
  color: inherit;
}

.tip-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.tip-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-soft);
}

.tip-card-head,
.tip-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tip-card h3 {
  margin-bottom: 0;
  color: var(--ink);
}

.tip-card p {
  margin-bottom: 0;
  color: #405057;
}

.tip-card small {
  color: var(--muted);
  font-weight: 800;
}

.tip-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.tip-empty {
  min-height: 120px;
}

.private-gate,
.private-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

.private-gate {
  display: grid;
  grid-template-columns: minmax(220px, 360px) auto minmax(240px, 1fr);
  gap: 12px;
  align-items: end;
  padding: 16px;
}

.private-gate p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.private-panel {
  padding: 14px;
}

.private-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.voice-settings {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(180px, 0.65fr) minmax(180px, 0.65fr) auto;
  gap: 12px;
  align-items: end;
  border: 1px solid #f7df9d;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 14px;
  background: #fffbeb;
}

.voice-settings strong {
  color: #713f12;
}

.voice-settings p {
  margin: 4px 0 0;
  color: #854d0e;
  font-size: 0.84rem;
  line-height: 1.4;
}

.voice-settings .voice-status {
  margin-top: 8px;
  color: #9a3412;
  font-weight: 750;
}

.private-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.private-tabs button.active {
  border-color: var(--teal);
  background: var(--teal);
  color: #ffffff;
}

.private-tab-panel {
  display: none;
}

.private-tab-panel.active {
  display: block;
}

.private-split {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 14px;
}

.private-list {
  display: grid;
  gap: 9px;
}

.private-item,
.finance-summary {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel-soft);
}

.private-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.private-item p {
  display: grid;
  gap: 2px;
  margin-bottom: 0;
}

.private-item span,
.finance-summary p {
  color: var(--muted);
}

.private-form {
  display: grid;
  align-content: start;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.82);
}

.finance-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.finance-form .primary-button {
  grid-column: 1 / -1;
  width: fit-content;
}

.timeshare-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.36fr);
  gap: 14px;
  align-items: start;
}

.timeshare-main,
.timeshare-side,
.timeshare-stats {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
}

.timeshare-main {
  padding: 14px;
}

.timeshare-side {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.timeshare-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.timeshare-toolbar p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.season-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 12px;
  color: #405057;
  font-size: 0.84rem;
}

.season-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.season-dot {
  width: 12px;
  height: 12px;
  display: inline-block;
  border-radius: 999px;
  border: 1px solid rgba(23, 32, 38, 0.16);
}

.season-dot.high {
  background: #f97316;
}

.season-dot.mid {
  background: #facc15;
}

.season-dot.low {
  background: #bae6fd;
}

.season-dot.booked {
  background: var(--teal);
}

.year-calendar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.month-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfc;
}

.month-card h4 {
  margin-bottom: 8px;
  color: #172026;
  text-transform: capitalize;
}

.weekday-row,
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
}

.weekday-row {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-align: center;
}

.day-cell {
  position: relative;
  min-width: 0;
  aspect-ratio: 1;
  min-height: 30px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 2px;
  color: #172026;
  font-size: 0.72rem;
  font-weight: 650;
  text-align: left;
  background: #eef6f8;
}

.day-cell.empty {
  background: transparent;
}

.day-cell.season-high {
  background: #ffedd5;
}

.day-cell.season-mid {
  background: #fef9c3;
}

.day-cell.season-low {
  background: #e0f2fe;
}

.day-cell.booked {
  border-color: rgba(15, 118, 110, 0.45);
  background: #ccfbf1;
  box-shadow: inset 0 -3px 0 rgba(15, 118, 110, 0.35);
}

.day-cell.booked.optie {
  border-style: dashed;
  background: #ecfccb;
}

.day-cell.selected {
  outline: 2px solid #c60b1e;
  outline-offset: 1px;
}

.day-cell strong {
  position: absolute;
  right: 3px;
  bottom: 2px;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--teal);
  color: #ffffff;
  font-size: 0.63rem;
}

.timeshare-form h3,
.timeshare-stats h3 {
  margin-bottom: 0;
}

.form-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.timeshare-stats {
  display: grid;
  gap: 7px;
  padding: 12px;
}

.timeshare-stat-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(86px, auto);
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
  font-size: 0.84rem;
}

.timeshare-stat-row strong {
  color: var(--teal);
}

.timeshare-stat-row small,
.timeshare-item small {
  color: var(--muted);
}

.timeshare-list {
  max-height: 360px;
  overflow: auto;
}

.timeshare-item {
  align-items: flex-start;
}

.finance-summary {
  display: grid;
  gap: 9px;
}

.finance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.finance-row strong {
  color: var(--teal);
}

.villa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 14px;
}

.villa-card {
  display: grid;
  align-content: start;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.villa-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.villa-image {
  position: relative;
  min-height: 214px;
  background: #dbe4e2;
}

.villa-image img {
  width: 100%;
  height: 100%;
  min-height: 214px;
  display: block;
  object-fit: cover;
}

.top-rank {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 1;
  display: grid;
  min-width: 148px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  padding: 12px 13px;
  background: rgba(23, 32, 38, 0.86);
  color: #ffffff;
  box-shadow: 0 14px 32px rgba(23, 32, 38, 0.26);
}

.top-rank strong {
  font-family: "Bodoni 72", Didot, "Baskerville", Georgia, serif;
  font-size: 3.1rem;
  font-style: italic;
  line-height: 0.8;
}

.top-rank span {
  margin-top: 7px;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.badge-row {
  position: absolute;
  top: 10px;
  right: 10px;
  left: 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}

.badge,
.pill,
.fact {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 7px;
  padding: 4px 8px;
  font-size: 0.8rem;
  font-weight: 850;
}

.pill,
.fact {
  font-weight: 500;
}

.badge {
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
}

.villa-body {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.card-top,
.metric-row,
.vote-row,
.card-footer,
.country-line {
  justify-content: space-between;
  gap: 10px;
}

.country-line {
  align-items: flex-start;
}

.price {
  color: var(--blue);
  font-weight: 950;
  white-space: nowrap;
}

.summary {
  color: #3f504d;
  font-size: 0.94rem;
}

.top-reason {
  margin: -2px 0 8px;
  color: #9a3412;
  font-size: 0.84rem;
  font-weight: 850;
}

.realtor-button {
  justify-self: start;
  min-height: 30px;
  border-color: rgba(14, 111, 119, 0.18);
  padding: 0 10px;
  background: rgba(234, 245, 241, 0.9);
  color: var(--teal);
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: none;
}

.realtor-button:hover {
  background: #dff0eb;
}

.pill-row,
.fact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.access-note {
  margin: -2px 0 0;
  color: #647274;
  font-size: 0.82rem;
  line-height: 1.35;
}

.pill {
  background: #eaf5f1;
  color: var(--teal);
}

.pill.warn {
  background: #fff3e8;
  color: #c05621;
}

.pill.good {
  background: #edf8f1;
  color: var(--green);
}

.fact {
  background: #edf1ef;
  color: #354742;
}

.style-fact {
  background: #fff2df;
  color: #9a3412;
}

.meter {
  position: relative;
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7ebea;
}

.meter span {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--value);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--orange), var(--sun), var(--teal));
}

.rating-reason {
  margin: 8px 0 0;
  color: #405057;
  font-size: 0.86rem;
}

.rating-toggle {
  display: flex;
  width: 100%;
  min-height: 0;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.rating-toggle:hover {
  transform: none;
}

.rating-toggle .score {
  color: var(--teal);
}

.rating-breakdown {
  display: grid;
  gap: 1px;
  overflow: hidden;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  font-size: 0.78rem;
}

.rating-breakdown[hidden] {
  display: none;
}

.breakdown-head,
.breakdown-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 74px 58px;
  gap: 8px;
  align-items: center;
  padding: 8px 9px;
  background: #ffffff;
}

.breakdown-head {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.breakdown-row strong,
.breakdown-row small {
  display: block;
}

.breakdown-row small {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.2;
}

.breakdown-row > span:last-child {
  font-weight: 950;
  text-align: right;
}

.breakdown-row .positive {
  color: var(--green);
}

.breakdown-row .negative {
  color: var(--rose);
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.insight-card {
  display: grid;
  gap: 5px;
  min-height: 104px;
  border: 1px solid rgba(180, 74, 43, 0.2);
  border-radius: 8px;
  padding: 10px;
  background: #fff7ed;
  color: #7c2d12;
}

.insight-card.good {
  border-color: #cde8d5;
  background: #edf8f1;
  color: #14532d;
}

.insight-card.warn {
  border-color: #f2d6bd;
  background: #fff3e8;
  color: #9a3412;
}

.style-card {
  border-color: rgba(31, 95, 136, 0.22);
  background: #edf6f8;
  color: #17475f;
}

.water-risk {
  grid-column: 1 / -1;
}

.water-risk.low {
  border-color: #cde8d5;
  background: #edf8f1;
  color: #14532d;
}

.water-risk.medium {
  border-color: #f7df9d;
  background: #fffbeb;
  color: #854d0e;
}

.water-risk.high {
  border-color: #f2d6bd;
  background: #fff3e8;
  color: #9a3412;
}

.water-risk.severe {
  border-color: #f6b6c4;
  background: #fff1f2;
  color: #9f1239;
}

.maintenance-card {
  border-color: rgba(31, 95, 136, 0.2);
  background: #eef6fb;
  color: #1f4f72;
}

.insight-card strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.insight-card p {
  margin-bottom: 0;
  font-size: 0.78rem;
  line-height: 1.28;
}

.insight-card small {
  color: inherit;
  font-size: 0.7rem;
  line-height: 1.2;
  opacity: 0.82;
}

.insight-label {
  font-size: 0.76rem;
  font-weight: 950;
  text-transform: uppercase;
}

.risk-dots {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}

.risk-dots span {
  height: 8px;
  border-radius: 999px;
  background: rgba(23, 32, 38, 0.14);
}

.risk-dots .filled {
  background: currentColor;
}

.score {
  min-width: 64px;
  text-align: right;
  font-weight: 950;
}

.vote-row {
  padding-top: 3px;
}

.vote-buttons {
  display: inline-flex;
  gap: 6px;
}

.vote-button {
  min-width: 44px;
  padding: 0 10px;
}

.vote-button.active.up {
  border-color: var(--green);
  background: var(--green);
  color: #ffffff;
}

.vote-button.active.down {
  border-color: var(--rose);
  background: var(--rose);
  color: #ffffff;
}

.vote-score {
  font-weight: 950;
}

.temps {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 4px;
  align-items: end;
  height: 98px;
  margin-top: 6px;
}

.temp-bar {
  display: grid;
  align-items: end;
  justify-items: center;
  min-width: 0;
  height: 100%;
}

.temp-bar span {
  width: 100%;
  min-height: 10px;
  height: var(--height);
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #facc15, #f97316);
}

.temp-bar small {
  display: grid;
  justify-items: center;
  gap: 1px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1.05;
}

.temp-bar strong {
  color: var(--ink);
  font-size: 0.68rem;
}

.card-footer a,
.view-button {
  color: var(--teal);
  font-weight: 950;
  text-decoration: none;
}

.view-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 8px;
  background: var(--teal);
  color: #ffffff;
  white-space: nowrap;
  box-shadow: 0 10px 20px rgba(14, 111, 119, 0.16);
}

.view-button:hover {
  background: #0f766e;
}

.site-footer {
  width: min(1480px, calc(100% - 28px));
  margin: 12px auto 0;
  padding: 26px 0 34px;
  border-top: 1px solid rgba(21, 32, 31, 0.1);
}

.site-footer > div:first-child {
  max-width: 860px;
  margin-bottom: 18px;
}

.site-footer h2 {
  margin-bottom: 8px;
}

.site-footer p {
  color: var(--muted);
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.method-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

.method-card h2 {
  margin-bottom: 10px;
  color: var(--ink);
}

.method-card ul {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding-left: 18px;
  color: #405057;
  font-size: 0.92rem;
}

.method-card strong {
  color: var(--ink);
}

.source-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.source-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 20px rgba(21, 32, 31, 0.05);
}

.source-card h3 {
  margin-bottom: 10px;
  color: #c60b1e;
  font-family: "Bodoni 72", Didot, "Baskerville", Georgia, serif;
  font-size: 1.2rem;
  font-style: italic;
}

.source-card ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.source-card a {
  color: var(--teal);
  font-weight: 800;
  text-decoration: none;
}

.source-card a:hover {
  text-decoration: underline;
}

.empty {
  grid-column: 1 / -1;
  min-height: 180px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.58);
  text-align: center;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  max-width: 320px;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1320px) {
  .ranking-grid,
  .map-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .section-heading,
  .control-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-nav {
    justify-content: flex-start;
  }

  .hero-content {
    width: min(680px, calc(100% - 32px));
    margin-left: 16px;
    padding-top: 86px;
  }

  .control-band {
    margin-top: -64px;
  }

  .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-section-title {
    grid-column: 1 / -1;
    min-height: auto;
    padding: 7px 0 0;
    border: 0;
  }

  .tip-layout,
  .tip-grid,
  .private-gate,
  .private-split,
  .timeshare-shell,
  .online-search-panel,
  .voice-settings {
    grid-template-columns: 1fr;
  }

  .online-results {
    grid-template-columns: 1fr;
  }

  .year-calendar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .method-grid,
  .source-grid {
    grid-template-columns: 1fr;
  }

  .style-filter {
    grid-column: 1 / -1;
  }

}

@media (max-width: 640px) {
  .nav {
    justify-content: flex-start;
  }

  .hero-nav {
    top: 14px;
    right: 14px;
    left: 14px;
  }

  .nav.hero-nav a {
    min-height: 34px;
    padding: 0 9px;
    font-size: 0.92rem;
  }

  .hero {
    min-height: 560px;
  }

  .hero-flags {
    gap: 8px;
    margin-bottom: 10px;
    font-size: clamp(2rem, 11vw, 3.2rem);
  }

  h1 {
    font-size: clamp(2.55rem, 16vw, 4.4rem);
  }

  .control-head,
  .section-heading {
    gap: 8px;
    margin-bottom: 12px;
  }

  .tip-form,
  .finance-form,
  .form-pair,
  .villa-grid,
  .ranking-grid,
  .map-grid,
  .year-calendar {
    grid-template-columns: 1fr;
  }

  .control-band {
    width: min(1480px, calc(100% - 18px));
    margin-top: -58px;
    padding: 11px;
  }

  .filters {
    gap: 8px;
  }

  .filter-section-title {
    margin-top: 2px;
  }

  .radio-row label,
  .toggle-row label {
    min-height: 30px;
    font-size: 0.82rem;
  }

  .online-search-panel {
    padding: 10px;
  }

  .rank-tile,
  .insight-grid {
    grid-template-columns: 1fr;
  }

  .card-top,
  .metric-row,
  .vote-row,
  .card-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .score {
    text-align: left;
  }

  .temps {
    height: 106px;
  }

  .temp-bar small {
    font-size: 0.54rem;
  }

  .villa-map {
    min-height: 270px;
  }

  .map-preview {
    grid-template-columns: 112px minmax(0, 1fr);
  }
}

@media (max-width: 430px) {
  .hero-nav {
    gap: 6px;
  }

  .nav.hero-nav a {
    min-height: 32px;
    padding: 0 8px;
    font-size: 0.86rem;
  }

  .hero {
    min-height: 520px;
  }

  .control-band,
  .ranking-band,
  .map-band,
  .tip-band,
  .private-band,
  .country-section,
  .site-footer {
    width: min(1480px, calc(100% - 14px));
  }

  .top-rank {
    min-width: 124px;
    padding: 10px 11px;
  }

  .top-rank strong {
    font-size: 2.7rem;
  }

  .map-preview {
    grid-template-columns: 94px minmax(0, 1fr);
  }
}
