:root {
  --bg: #f1ecdf;
  --paper: #fffdf7;
  --ink: #1b2a31;
  --line: #d9d0be;
  --accent: #0f5c73;
  --shadow: 0 18px 40px rgba(20, 33, 40, 0.12);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  overflow: hidden;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  background: linear-gradient(180deg, #efe9dc 0%, var(--bg) 100%);
}

.app {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

.track {
  display: flex;
  height: 100%;
  transition: transform 0.55s ease;
}

.slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
}

.slide-inner {
  height: 100%;
}

.full-slide {
  display: flex;
  align-items: flex-end;
  padding: clamp(24px, 5vw, 56px);
}

.cover {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(180deg, rgba(12, 22, 27, 0.18) 0%, rgba(12, 22, 27, 0.76) 100%),
    url("media/portada.jpg") center / cover no-repeat;
}

.intro {
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(180deg, rgba(12, 22, 27, 0.28) 0%, rgba(12, 22, 27, 0.58) 100%),
    url("media/sc.png") center / cover no-repeat;
}

.intro-split {
  width: min(1420px, 98%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  gap: clamp(16px, 2.2vw, 28px);
  padding-bottom: 85px;
}

.intro .intro-block {
  background: rgba(4, 34, 44, 0.82);
  color: #f4f8ff;
  height: clamp(460px, 78vh, 800px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: clamp(16px, 1.8vw, 24px);
}

.intro-block h3 {
  margin: 0 0 12px;
  font-size: clamp(24px, 2.2vw, 32px);
  line-height: 1.1;
  text-align: center;
}

.intro-block p {
  font-size: clamp(16px, 1.15vw, 18px);
  line-height: 1.45;
  text-align: justify;
}

.intro-block p + p {
  margin-top: 8px;
}

.intro-block img {
  display: block;
  width: 100%;
  margin-top: auto;
  border-radius: 14px;
  max-height: clamp(190px, 34vh, 380px);
  object-fit: contain;
}

.card {
  width: min(760px, 100%);
  padding: clamp(24px, 4vw, 44px);
  border-radius: 24px;
  background: rgba(255, 253, 247, 0.92);
  box-shadow: var(--shadow);
}

.cover .card {
  background: rgba(17, 33, 39, 0.72);
  color: #fff;
  width: min(1180px, 94%);
  min-height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(26px, 4.2vw, 44px);
  margin-bottom: clamp(170px, 29vh, 260px);
}

.cover .card p {
  max-width: 1100px;
}

.cover .card h1 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 52px);
}

.cover .card h1 + p {
  margin-top: 18px;
}

.cover-logos {
  position: absolute;
  left: 50%;
  bottom: clamp(130px, 20vh, 210px);
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(34px, 6vw, 92px);
  z-index: 2;
  width: min(1180px, 94%);
  height: auto;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 0 0 auto;
}

.lang-btn {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 50%;
  background: rgba(17, 33, 39, 0.68);
  color: #f8fbff;
  font: 700 13px/1 Arial, sans-serif;
  letter-spacing: 0;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.lang-btn.active {
  background: #f8fbff;
  color: #10252d;
  border-color: #f8fbff;
}

.cover-logos img {
  max-width: min(33vw, 360px);
  height: clamp(132px, 20vh, 240px);
  width: auto;
  object-fit: contain;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: none;
}

.cover .eyebrow {
  color: #cfe7ef;
}

h1, h2, h3 {
  margin: 0 0 12px;
  line-height: 1.08;
}

h1 { font-size: clamp(38px, 6vw, 72px); }
h2 { font-size: clamp(30px, 4vw, 48px); }
h3 { font-size: clamp(28px, 4vw, 46px); }

p {
  margin: 0;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.6;
}

.map-slide {
  display: grid;
  grid-template-columns: minmax(360px, 36%) 1fr;
  grid-template-rows: 1fr;
  height: 100%;
  background: linear-gradient(180deg, #f7f2e8 0%, #efe7d7 100%);
}

.vuln-map-slide {
  grid-template-columns: minmax(290px, 28%) 1fr;
}

.map-slide.panel-right {
  grid-template-columns: 1fr minmax(360px, 36%);
}

.map-slide.panel-right .map-stage {
  grid-column: 1;
}

.map-slide.panel-right .panel {
  grid-column: 2;
}

.panel {
  position: relative;
  z-index: 2;
  padding: clamp(22px, 4vw, 42px);
  display: flex;
  align-items: stretch;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  background-color: rgba(4, 34, 44, 0.78);
}

.panel::-webkit-scrollbar {
  display: none;
}

.panel .card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 720px;
  margin: auto 0;
  padding: 0 28px 0 0;
  border-radius: 0;
  box-shadow: none;
  border: 0;
  background: transparent;
  color: #f4f8ff;
}

.panel .card h1,
.panel .card h2,
.panel .card h3,
.panel .card p {
  color: #f4f8ff;
}

.panel .card h3 {
  margin-bottom: 20px;
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.15;
}

.panel .card p {
  font-size: clamp(15px, 1.05vw, 18px);
  line-height: 1.5;
}

.panel .card p + p {
  margin-top: 18px;
}

.map-stage {
  position: relative;
  background: transparent;
  z-index: 3;
}

.summary-slide {
  position: relative;
  height: 100%;
}

.summary-overlay {
  position: absolute;
  top: clamp(22px, 6vh, 56px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  width: min(1560px, 90%);
  padding: clamp(22px, 2vw, 10px);
  border-radius: 20px;
  background: rgba(12, 24, 34, 0.45);
  color: #fff;
  text-align: center;
  pointer-events: none;
  backdrop-filter: blur(2px);
}

.summary-overlay p {
  font-size: clamp(17px, 1.8vw, 22px);
}

.summary-overlay p + p {
  margin-top: 14px;
}

.app.summary-mode .track {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.app.summary-mode .summary-overlay {
  display: block;
}

.shared-map-shell {
  position: absolute;
  top: 0;
  right: 0;
  width: 72%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.map-overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
}

.map-select-hint {
  position: absolute;
  left: 50%;
  top: 36px;
  transform: translateX(-50%);
  margin: 0;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  color: #f4f8ff;
  background: rgba(4, 34, 44, 0.82);
  box-shadow: 0 10px 22px rgba(20, 33, 40, 0.2);
}

.map-select-hint.hidden {
  display: none;
}

.app.map-overview-mode.remaining-group-mode .map-select-hint {
  top: auto;
  bottom: 92px;
}

.base-layer-btn {
  display: none;
  position: absolute;
  left: 16px;
  top: 16px;
  transform: none;
  border: 2px solid rgba(15, 92, 115, 0.92);
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
  color: #f4f8ff;
  background: rgba(15, 92, 115, 0.78);
  box-shadow: 0 12px 28px rgba(20, 33, 40, 0.36);
  cursor: pointer;
  pointer-events: auto;
  z-index: 10;
}

.base-layer-btn:hover {
  filter: brightness(1.08);
}

.app.area-detail-mode .base-layer-btn {
  display: block;
}

.flood-prob-btn {
  display: none;
  position: absolute;
  left: 16px;
  transform: none;
  border: 2px solid rgba(15, 92, 115, 0.92);
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
  color: #f4f8ff;
  background: rgba(15, 92, 115, 0.78);
  box-shadow: 0 12px 28px rgba(20, 33, 40, 0.36);
  cursor: pointer;
  pointer-events: auto;
  z-index: 10;
}

.flood-prob-btn-10 {
  top: 78px;
}

.flood-prob-btn-100 {
  top: 140px;
}

.flood-prob-btn:hover {
  filter: brightness(1.08);
}

.flood-prob-btn.active {
  border-color: rgba(255, 241, 0, 0.96);
  background: rgba(255, 241, 0, 0.33);
}

.app.area-detail-mode .flood-prob-btn.visible {
  display: block;
}

.app.map-overview-mode .shared-map {
  filter: brightness(0.72);
}

.map-info-card {
  position: absolute;
  right: clamp(16px, 2vw, 30px);
  top: clamp(16px, 2.8vh, 30px);
  width: min(400px, 34vw);
  padding: 16px 18px;
  border-radius: 14px;
  color: #f4f8ff;
  background: rgba(4, 34, 44, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 14px 30px rgba(20, 33, 40, 0.22);
  display: none;
}

.app.area-detail-mode .map-info-card {
  display: none !important;
}

.map-info-card.visible {
  display: block;
}

.map-info-card h4 {
  margin: 0 0 8px;
  font-size: clamp(18px, 1.5vw, 24px);
  line-height: 1.2;
}

.map-info-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
}

.map-info-card p + p {
  margin-top: 8px;
}

.area-chip-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.area-chip {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 12px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #f4f8ff;
  font: inherit;
  font-size: 15px;
  line-height: 1.35;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.area-chip:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.85);
}

.area-chip.active {
  border-color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 241, 0, 0.52);
}

.area-detail-card {
  display: none;
}

.area-detail-card h3 {
  margin: 0 0 14px;
}

.area-detail-card p + p {
  margin-top: 10px;
}

.area-detail-card img {
  display: none;
  width: 100%;
  margin-top: 16px;
  border-radius: 12px;
  max-height: 280px;
  object-fit: cover;
}

.app.area-detail-mode #areaListCard {
  display: none;
}

.app.area-detail-mode .map-slide.panel-right {
  grid-template-columns: 1fr minmax(460px, 38%);
}

.app.area-detail-mode .shared-map-shell.left {
  width: 62%;
}

.app.area-detail-mode #areaDetailCard {
  display: block;
  width: min(980px, 100%);
  max-width: 980px;
  margin: 0 !important;
  padding-right: 0;
  align-self: flex-start;
}

.app.area-detail-mode .panel {
  align-items: flex-start !important;
}

.app.area-detail-mode .panel .card {
  margin: 0 !important;
  max-width: 980px;
  padding-right: 0;
}

.app.area-detail-mode #areaDetailCard h3 {
  margin-top: 0;
}

.app.area-detail-mode #areaDetailCard p {
  text-align: justify;
}

.app.area-detail-mode #areaDetailMeta {
  margin-top: 2px;
  margin-bottom: 14px;
  font-size: clamp(16px, 1.15vw, 19px);
  font-weight: 700;
  text-align: left;
}

.area-detail-text p {
  margin: 0;
  font-size: clamp(17px, 1.2vw, 20px);
  line-height: 1.62;
  text-align: justify;
}

.area-detail-text p + p {
  margin-top: 16px;
}

.inline-effect-link {
  color: #fff100;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.inline-effect-link:hover {
  filter: brightness(1.08);
}

.area-point-detail {
  display: none;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.area-point-detail.visible {
  display: block;
}

.area-point-detail h4 {
  margin: 0 0 8px;
  font-size: clamp(18px, 1.45vw, 24px);
  line-height: 1.2;
}

.area-point-detail p {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  text-align: justify;
}

.area-point-detail img {
  display: none;
  width: 100%;
  margin-top: 10px;
  border-radius: 10px;
  max-height: 240px;
  object-fit: cover;
}

.map-back-btn {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  border: 0;
  border-radius: 999px;
  padding: 11px 22px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #f4f8ff;
  background: rgba(15, 92, 115, 0.78);
  border: 2px solid rgba(15, 92, 115, 0.92);
  box-shadow: 0 12px 28px rgba(20, 33, 40, 0.36);
  cursor: pointer;
  pointer-events: auto;
  animation: ctaPulse 1.2s ease-in-out infinite;
  z-index: 13;
  display: none;
}

.app.area-detail-mode .map-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.app.area-detail-mode .group-arrow {
  display: none;
}

.group-arrow {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: linear-gradient(180deg, rgba(16, 84, 104, 0.96) 0%, rgba(8, 56, 69, 0.96) 100%);
  color: #f4f8ff;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(20, 33, 40, 0.36);
  pointer-events: auto;
  animation: ctaPulse 1.2s ease-in-out infinite;
  z-index: 12;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}

.group-arrow .arrow-icon {
  width: 14px;
  height: 14px;
  border-right: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: rotate(45deg);
}

.group-arrow.up .arrow-icon {
  transform: rotate(-135deg);
}

.group-arrow:hover {
  filter: brightness(1.08);
}

.group-arrow.down {
  bottom: 24px;
}

.group-arrow.up {
  top: 24px;
}

.group-arrow.hidden {
  display: none;
}

.shared-map-shell.visible {
  opacity: 1;
  pointer-events: auto;
}

.shared-map-shell.left {
  left: 0;
  right: auto;
}

.shared-map-shell.full {
  left: 0;
  right: 0;
  width: 100%;
}

.shared-map-shell.full .shared-map {
  filter: brightness(0.75);
}

.shared-map {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
}

.controls {
  position: absolute;
  left: 50%;
  bottom: clamp(46px, 8vh, 86px);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateX(-50%);
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(4, 34, 44, 0.92);
  box-shadow: 0 12px 28px rgba(20, 33, 40, 0.12);
}

.app.ui-pending .controls {
  visibility: hidden;
  pointer-events: none;
}

.controls button {
  border: 0;
  border-radius: 999px;
  min-width: 132px;
  min-height: 48px;
  padding: 12px 22px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  background: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.controls button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.controls button:disabled {
  cursor: default;
  opacity: 0.45;
}

.controls button.cta-pulse {
  animation: ctaPulse 1.2s ease-in-out infinite;
}

@keyframes ctaPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.07);
  }
}

#finishBtn {
  display: none;
  align-items: center;
  border-radius: 999px;
  padding: 12px 18px;
  font: inherit;
  font-size: 15px;
  text-decoration: none;
  color: #fff;
  background: var(--accent);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

#finishBtn:hover {
  transform: translateY(-1px);
}

.leaflet-popup-content-wrapper {
  border-radius: 16px;
  background: rgba(4, 34, 44, 0.92);
  box-shadow: 0 14px 32px rgba(20, 33, 40, 0.2);
}

.leaflet-popup-content {
  margin: 18px 22px;
}

.map-popup {
  font-family: Georgia, "Times New Roman", serif;
  color: #f4f8ff;
  font-size: 18px;
  line-height: 1.5;
  min-width: 300px;
  max-width: 440px;
  max-height: 72vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
}

.map-popup.has-image {
  min-width: 560px;
  max-width: 760px;
}

.map-popup strong {
  display: block;
  margin-bottom: 8px;
  font-size: 22px;
  text-align: center;
}

.map-popup p {
  margin: 0;
  font-size: 18px;
  line-height: 1.55;
  text-align: justify;
}

.panel .card p {
  text-align: justify;
}

.map-popup p + p {
  margin-top: 14px;
}

.map-popup .popup-image-wrap {
  position: relative;
  margin-top: 14px;
}

.map-popup img {
  display: block;
  width: 100%;
  min-height: 320px;
  max-height: 42vh;
  object-fit: cover;
  border-radius: 12px;
}

.map-popup .image-credit {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.2;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
}

.leaflet-interactive.popup-point-marker {
  transform-box: fill-box;
  transform-origin: center;
  animation: popupPointPulse 1.4s ease-in-out infinite;
}

.leaflet-interactive.popup-point-marker:hover {
  animation-play-state: paused;
}

.effect-slide {
  --effect-bg-image: url("media/embu1.png");
  position: relative;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  background: rgba(4, 34, 44, 0.9);
}

.effect-slide::before {
  content: "";
  position: absolute;
  inset: -20px;
  background:
    linear-gradient(180deg, rgba(4, 34, 44, 0.46) 0%, rgba(4, 34, 44, 0.7) 100%),
    var(--effect-bg-image) center / cover no-repeat;
  filter: blur(18px) saturate(1.06);
  transform: scale(1.08);
  z-index: 0;
}

.effect-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, 95%);
  margin: 0 auto;
  text-align: center;
}

.effect-carousel {
  position: relative;
  overflow: visible;
}

.effect-item,
.saladar-item,
.paleo-item {
  --effect-card-bg: rgba(2, 19, 24, 0.88);
  display: none;
  width: min(1060px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 2.2vw, 28px);
  border-radius: 18px;
  color: #f4f8ff;
  background: var(--effect-card-bg);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.25);
}

.effect-item.active,
.saladar-item.active,
.paleo-item.active {
  display: block;
}

.effect-item img,
.saladar-item img,
.paleo-item img {
  width: 100%;
  max-height: min(56vh, 560px);
  border-radius: 12px;
  object-fit: contain;
  background: var(--effect-card-bg);
}

.effect-item p,
.saladar-item p,
.paleo-item p {
  margin-top: 14px;
  font-size: clamp(17px, 1.15vw, 20px);
  line-height: 1.5;
  text-align: justify;
}

.effect-prev-btn,
.effect-next-btn,
.saladar-prev-btn,
.saladar-next-btn,
.paleo-prev-btn,
.paleo-next-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: 2px solid rgba(15, 92, 115, 0.92);
  background: rgba(15, 92, 115, 0.78);
  color: #f4f8ff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(20, 33, 40, 0.36);
  animation: ctaPulse 1.2s ease-in-out infinite;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.effect-prev-btn,
.saladar-prev-btn,
.paleo-prev-btn {
  left: clamp(-92px, -6vw, -48px);
}

.effect-next-btn,
.saladar-next-btn,
.paleo-next-btn {
  right: clamp(-92px, -6vw, -48px);
}

.effect-back-btn,
.saladar-back-btn,
.paleo-back-btn {
  margin-top: 18px;
  border: 2px solid rgba(15, 92, 115, 0.92);
  border-radius: 999px;
  padding: 10px 18px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  color: #f4f8ff;
  background: rgba(15, 92, 115, 0.78);
  cursor: pointer;
  display: none;
}

.effect-back-btn:hover,
.saladar-back-btn:hover,
.paleo-back-btn:hover {
  filter: brightness(1.08);
}

@keyframes popupPointPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.18);
  }
}

.status {
  min-width: 92px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: #f4f8ff;
}

@media (max-width: 980px) {
  .full-slide {
    padding: 18px;
  }

  .cover {
    align-items: center;
    background-position: center;
  }

  .cover .card {
    width: min(560px, 94%);
    padding: 22px 18px;
    margin-bottom: 254px;
    border-radius: 18px;
  }

  .cover .card h1 {
    font-size: 30px;
    line-height: 1.1;
  }

  .cover .card p {
    font-size: 17px;
    line-height: 1.45;
  }

  .cover-logos {
    width: calc(100% - 28px);
    height: auto;
    bottom: 116px;
    gap: clamp(12px, 4vw, 24px);
  }

  .cover-logos img {
    max-width: min(40vw, 220px);
    height: auto;
    max-height: 132px;
  }

  .language-switch {
    gap: 8px;
  }

  .lang-btn {
    width: 42px;
    height: 42px;
    font-size: 12px;
  }

  .controls {
    bottom: 38px;
    padding: 7px;
  }

  .controls button {
    min-width: 128px;
    min-height: 46px;
    padding: 11px 22px;
    font-size: 16px;
    font-weight: 700;
  }

  .intro-split {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .intro .intro-block {
    height: auto;
    min-height: 0;
  }

  .intro-block img {
    max-height: 22vh;
    margin-top: 12px;
  }

  .effect-prev-btn,
  .saladar-prev-btn,
  .paleo-prev-btn {
    left: 8px;
  }

  .effect-next-btn,
  .saladar-next-btn,
  .paleo-next-btn {
    right: 8px;
  }

  .effect-slide {
    padding: 16px 14px 18px;
    align-items: center;
  }

  .effect-shell {
    width: 100%;
    max-height: calc(100vh - 32px);
  }

  .effect-carousel {
    max-height: calc(100vh - 92px);
  }

  .effect-item,
  .saladar-item,
  .paleo-item {
    width: min(720px, 100%);
    max-height: calc(100vh - 92px);
    padding: 14px;
    border-radius: 14px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .effect-item img,
  .saladar-item img,
  .paleo-item img {
    max-height: min(34vh, 260px);
    border-radius: 10px;
  }

  .effect-item p,
  .saladar-item p,
  .paleo-item p {
    margin-top: 10px;
    font-size: 15px;
    line-height: 1.42;
    text-align: left;
  }

  .effect-prev-btn,
  .effect-next-btn,
  .saladar-prev-btn,
  .saladar-next-btn,
  .paleo-prev-btn,
  .paleo-next-btn {
    top: auto;
    bottom: 10px;
    width: 44px;
    height: 44px;
    font-size: 28px;
    z-index: 3;
  }

  .effect-back-btn,
  .saladar-back-btn,
  .paleo-back-btn {
    margin-top: 10px;
  }

  .map-slide {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
  }

  .map-slide.panel-right,
  .app.area-detail-mode .map-slide.panel-right {
    grid-template-columns: 1fr;
  }

  .vuln-map-slide {
    grid-template-columns: 1fr;
  }

  .panel {
    background: rgba(4, 34, 44, 0.82);
    height: 44%;
    min-height: 44%;
    padding: 18px;
  }

  .shared-map-shell {
    top: auto;
    bottom: 0;
    left: 0;
    right: auto;
    width: 100%;
    height: 56%;
  }

  .app.area-detail-mode .shared-map-shell.left {
    left: 0;
    right: auto;
    width: 100%;
    height: 52%;
  }

  .app.area-detail-mode .panel {
    height: 48%;
    min-height: 48%;
  }

  .map-select-hint {
    top: 12px;
    max-width: calc(100% - 24px);
    text-align: center;
  }

  .base-layer-btn {
    top: 12px;
    left: 12px;
    padding: 9px 11px;
    max-width: calc(100% - 24px);
    text-align: left;
    font-size: 11px;
  }

  .flood-prob-btn {
    left: 12px;
    padding: 9px 11px;
    max-width: calc(100% - 24px);
    text-align: left;
    font-size: 11px;
  }

  .flood-prob-btn-10 {
    top: 74px;
  }

  .flood-prob-btn-100 {
    top: 136px;
  }

  .map-info-card {
    right: 12px;
    left: 12px;
    top: 46px;
    width: auto;
  }

  .group-arrow.down {
    bottom: 14px;
  }

  .group-arrow.up {
    top: 10px;
  }

  .panel .card {
    max-width: none;
    padding-right: 0;
  }

  .area-chip-list {
    gap: 8px;
  }

  .area-chip {
    padding: 9px 10px;
    font-size: 14px;
  }

  .area-detail-text p {
    font-size: 15px;
    line-height: 1.5;
    text-align: left;
  }

  .app.area-detail-mode #areaDetailCard p {
    text-align: left;
  }

  .map-back-btn {
    bottom: 12px;
    padding: 10px 18px;
    font-size: 14px;
  }
}

@media (max-width: 560px) {
  .cover .card {
    width: 100%;
    margin-bottom: 224px;
    padding: 20px 16px;
  }

  .cover .card h1 {
    font-size: 25px;
  }

  .cover .card h1 + p {
    margin-top: 12px;
  }

  .cover .card p {
    font-size: 15px;
  }

  .cover-logos {
    bottom: 104px;
    gap: 10px;
  }

  .cover-logos img {
    max-width: 36vw;
    max-height: 98px;
  }

  .lang-btn {
    width: 38px;
    height: 38px;
    font-size: 11px;
  }

  .controls {
    bottom: 34px;
  }

  .controls button {
    min-width: 118px;
    min-height: 42px;
    padding: 10px 18px;
    font-size: 15px;
  }

  .effect-slide {
    padding: 12px 10px 14px;
  }

  .effect-carousel {
    max-height: calc(100vh - 78px);
  }

  .effect-item,
  .saladar-item,
  .paleo-item {
    max-height: calc(100vh - 78px);
    padding: 12px;
  }

  .effect-item img,
  .saladar-item img,
  .paleo-item img {
    max-height: min(28vh, 190px);
  }

  .effect-item p,
  .saladar-item p,
  .paleo-item p {
    font-size: 14px;
    line-height: 1.38;
  }

  .panel {
    height: 46%;
    min-height: 46%;
    padding: 14px;
  }

  .shared-map-shell {
    height: 54%;
  }

  .app.area-detail-mode .panel {
    height: 52%;
    min-height: 52%;
  }

  .app.area-detail-mode .shared-map-shell.left {
    height: 48%;
  }

  .map-info-card {
    left: 10px;
    right: 10px;
    top: 54px;
    max-height: 42vh;
    overflow-y: auto;
  }

  .map-info-card p {
    font-size: 13px;
  }

  .base-layer-btn,
  .flood-prob-btn {
    left: 10px;
    font-size: 10px;
  }

  .flood-prob-btn-10 {
    top: 68px;
  }

  .flood-prob-btn-100 {
    top: 122px;
  }

  .group-arrow {
    width: 46px;
    height: 46px;
  }
}

@media (max-height: 560px) and (max-width: 980px) {
  .cover .card {
    margin-bottom: 156px;
    padding: 16px;
  }

  .cover .card h1 {
    font-size: 24px;
  }

  .cover .card p {
    font-size: 14px;
  }

  .cover-logos {
    bottom: 78px;
  }

  .cover-logos img {
    max-height: 68px;
  }

  .lang-btn {
    width: 34px;
    height: 34px;
    font-size: 10px;
  }

  .controls {
    bottom: 20px;
    padding: 5px;
  }

  .controls button {
    min-width: 104px;
    min-height: 36px;
    padding: 8px 14px;
    font-size: 14px;
  }

  .effect-slide {
    padding: 8px;
  }

  .effect-carousel,
  .effect-item,
  .saladar-item,
  .paleo-item {
    max-height: calc(100vh - 56px);
  }

  .effect-item,
  .saladar-item,
  .paleo-item {
    padding: 10px;
  }

  .effect-item img,
  .saladar-item img,
  .paleo-item img {
    max-height: 22vh;
  }

  .effect-item p,
  .saladar-item p,
  .paleo-item p {
    font-size: 13px;
    line-height: 1.34;
  }

  .panel {
    height: 50%;
    min-height: 50%;
  }

  .shared-map-shell,
  .app.area-detail-mode .shared-map-shell.left {
    height: 50%;
  }
}
.cover-cta {
  margin-top: 24px;
  border: 0;
  border-radius: 999px;
  padding: 13px 24px;
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  background: var(--accent);
}

.area-list {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.area-item {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #f4f8ff;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.area-item:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.14);
}

.area-item.active {
  border-color: rgba(255, 255, 255, 0.95);
  background: rgba(222, 107, 53, 0.35);
}

.area-name {
  display: block;
  font-weight: 700;
  font-size: 16px;
}

.area-risk {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  opacity: 0.95;
}

.area-detail {
  margin-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 14px;
}

.area-detail h4 {
  margin: 0 0 8px;
  font-size: clamp(18px, 1.45vw, 24px);
  line-height: 1.2;
  color: #f4f8ff;
}

.area-detail p {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: #f4f8ff;
}

.area-detail p + p {
  margin-top: 4px;
}

.area-detail img {
  width: 100%;
  margin-top: 10px;
  border-radius: 10px;
  max-height: 220px;
  object-fit: cover;
  display: none;
}

.secondary-btn {
  margin-top: 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  color: #f4f8ff;
  background: rgba(255, 255, 255, 0.08);
}

.empty-msg {
  font-size: 14px;
  color: #f4f8ff;
}

@media (max-width: 980px) {
  .area-detail img {
    max-height: 160px;
  }
}
