:root {
  --font-heading: 'Baloo 2', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, sans-serif;
  --sea1: #22a7d8;
  --sea2: #0f7fb0;
  --sea-deep: #0a5a80;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #cfe6ef;
  font-family: var(--font-body);
}

h1, h2, h3, h4 { font-family: var(--font-heading); letter-spacing: 0; margin: 0; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: rgba(15, 127, 176, .4); border-radius: 9px; }
::-webkit-scrollbar-track { background: transparent; }

/* Leaflet overrides */
.leaflet-container { background: #bfe0ec; font-family: var(--font-body); }
.leaflet-tile { filter: saturate(1.32) contrast(1.03) brightness(1.01); }
.leaflet-control-attribution { font-size: 9px; background: rgba(255, 255, 255, .68) !important; border-radius: 8px 0 0 0; }
.leaflet-control-zoom { border: none !important; box-shadow: none !important; }
.leaflet-control-zoom a {
  border-radius: 13px !important; color: var(--sea-deep) !important; font-weight: 700;
  background: rgba(255, 255, 255, .72) !important; backdrop-filter: blur(8px);
  border: 1px solid rgba(34, 167, 216, .32) !important; box-shadow: 0 2px 12px rgba(10, 90, 128, .25);
}
.leaflet-control-zoom a:hover {
  background: #fff !important;
  box-shadow: 0 0 0 3px rgba(34, 167, 216, .25), 0 3px 12px rgba(10, 90, 128, .3) !important;
}
.leaflet-control-zoom a + a { margin-top: 7px; }
.poi-icon, .region-icon { background: none; border: none; }

/* Animations */
@keyframes panelIn { from { transform: translateX(30px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes panelInUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes idlePulse { 0%, 100% { opacity: .55; box-shadow: 0 6px 24px rgba(34, 167, 216, .4); } 50% { opacity: 1; box-shadow: 0 8px 34px rgba(34, 167, 216, .7); } }
@keyframes pinPulse { 0% { box-shadow: 0 3px 10px rgba(10, 90, 128, .45), 0 0 0 0 rgba(34, 167, 216, .6); } 100% { box-shadow: 0 3px 10px rgba(10, 90, 128, .45), 0 0 0 18px rgba(34, 167, 216, 0); } }
@keyframes legendPinPulse { 0% { box-shadow: 0 3px 10px rgba(10, 90, 128, .45), 0 0 0 0 rgba(255, 196, 0, .75); } 100% { box-shadow: 0 3px 10px rgba(10, 90, 128, .45), 0 0 0 14px rgba(255, 196, 0, 0); } }
@keyframes legendSecPulse { 0% { box-shadow: 0 0 0 3px rgba(255, 196, 0, .4), 0 0 0 0 rgba(255, 196, 0, .75); } 100% { box-shadow: 0 0 0 3px rgba(255, 196, 0, .4), 0 0 0 12px rgba(255, 196, 0, 0); } }
@keyframes protectedPulse { 0% { filter: drop-shadow(0 0 2px rgba(255, 196, 0, .85)); } 50% { filter: drop-shadow(0 0 14px rgba(255, 196, 0, 1)); } 100% { filter: drop-shadow(0 0 2px rgba(255, 196, 0, .85)); } }
.protected-highlight { animation: protectedPulse 1.2s ease-in-out infinite; }

/* App shell */
.app {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  color: #233240;
}

/* Header */
.header {
  flex: none;
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 15px 26px;
  background: rgba(250, 253, 255, .55);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid rgba(255, 255, 255, .55);
  box-shadow: 0 3px 22px rgba(10, 90, 128, .14), inset 0 1px 0 rgba(255, 255, 255, .6);
  z-index: 1200;
}
.header-brand { display: flex; align-items: center; gap: 16px; min-width: 0; }
.brand-logo { height: 62px; width: auto; flex: none; display: block; filter: drop-shadow(0 2px 6px rgba(10, 90, 128, .22)); }
.brand-text { line-height: 1.1; min-width: 0; }
.eyebrow { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; font-weight: 700; color: var(--sea2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.title { font-family: var(--font-heading); font-weight: 700; font-size: 30px; color: #1b3346; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 16px; flex: none; }
.btn-reset {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-heading); font-weight: 700; font-size: 15px; color: var(--sea-deep);
  cursor: pointer; padding: 12px 21px; border-radius: 999px;
  border: 1px solid rgba(34, 167, 216, .42); background: rgba(255, 255, 255, .6);
  backdrop-filter: blur(8px); box-shadow: 0 2px 14px rgba(10, 90, 128, .2);
  transition: all .18s; white-space: nowrap;
}
.btn-reset:hover { background: #fff; color: var(--sea2); box-shadow: 0 0 0 3px rgba(34, 167, 216, .24), 0 5px 20px rgba(34, 167, 216, .45); }

/* Map */
.map-wrap { position: absolute; inset: 0; }
.map { position: absolute; inset: 0; }
.map-vignette {
  position: absolute; inset: 0; pointer-events: none; z-index: 450;
  box-shadow: inset 0 0 190px rgba(10, 90, 128, .34), inset 0 0 70px rgba(10, 90, 128, .16);
}

.icon-shrink { flex: none; }

/* Filter dropdown */
.filter-panel {
  position: absolute; top: 112px; left: 20px; width: 322px;
  max-height: calc(100% - 132px); display: flex; flex-direction: column; z-index: 1010;
}
.filter-trigger {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; font-family: var(--font-heading); font-weight: 700; font-size: 16px;
  color: var(--sea-deep); cursor: pointer; padding: 14px 20px; border-radius: 999px;
  border: 1px solid rgba(34, 167, 216, .4);
  background: rgba(250, 253, 255, .62); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: 0 4px 18px rgba(10, 90, 128, .2), inset 0 1px 0 rgba(255, 255, 255, .7);
  transition: all .18s;
}
.filter-trigger.is-open, .filter-trigger.has-filters { color: var(--sea2); }
.filter-trigger.is-open { border-color: rgba(34, 167, 216, .6); box-shadow: 0 6px 22px rgba(34, 167, 216, .32), inset 0 1px 0 rgba(255, 255, 255, .7); }
.filter-trigger-label { display: flex; align-items: center; gap: 10px; }
.filter-count-badge {
  font-family: var(--font-body); font-weight: 700; font-size: 11px; color: #fff;
  background: linear-gradient(145deg, var(--sea1), var(--sea2));
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  display: inline-grid; place-items: center;
}
#filter-chevron { transition: transform .22s; }
#filter-chevron.is-open { transform: rotate(180deg); }

.filter-body {
  margin-top: 10px; overflow-y: auto;
  background: rgba(250, 253, 255, .62); backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, .62); border-radius: 22px;
  box-shadow: 0 14px 44px rgba(10, 90, 128, .24), inset 0 1px 0 rgba(255, 255, 255, .7);
  padding: 20px 22px;
  animation: panelIn .26s cubic-bezier(.2, .8, .2, 1);
}
.filter-section-label {
  font-size: 11px; letter-spacing: .13em; text-transform: uppercase; font-weight: 700;
  color: var(--sea-deep); margin-bottom: 12px;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 22px; }
.month-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-bottom: 18px; }
.filter-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 34px; }
.match-label { font-size: 13px; font-weight: 700; color: #33566b; }
.btn-clear {
  font-family: var(--font-heading); font-weight: 700; font-size: 13px; color: var(--sea2);
  background: none; border: none; cursor: pointer; padding: 4px 6px;
}

.pill {
  padding: 8px 13px; font-size: 12.5px; font-family: var(--font-body); font-weight: 700;
  border: 1px solid rgba(15, 127, 176, .28); border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, .5); color: #0a5a80; white-space: nowrap; line-height: 1.1;
  transition: all .18s; backdrop-filter: blur(4px);
}
.pill:hover { box-shadow: 0 3px 12px rgba(34, 167, 216, .4); border-color: rgba(34, 167, 216, .65); }
.pill.is-on {
  background: linear-gradient(145deg, var(--sea1), var(--sea2)); color: #fff; border-color: transparent;
  box-shadow: 0 3px 13px rgba(34, 167, 216, .5), 0 0 0 3px rgba(34, 167, 216, .16);
}
.pill-month {
  padding: 9px 0; font-size: 12px; font-family: var(--font-heading); font-weight: 600;
  border: 1px solid rgba(15, 127, 176, .25); border-radius: 12px; cursor: pointer;
  background: rgba(255, 255, 255, .5); color: #0a5a80; transition: all .18s; text-align: center;
}
.pill-month:hover { box-shadow: 0 3px 12px rgba(34, 167, 216, .4); border-color: rgba(34, 167, 216, .65); }
.pill-month.is-on {
  background: linear-gradient(145deg, var(--sea1), var(--sea2)); color: #fff; border-color: transparent;
  box-shadow: 0 3px 12px rgba(34, 167, 216, .5);
}

/* Legend */
.legend-panel {
  position: absolute; bottom: 20px; left: 20px; width: 322px;
  background: rgba(250, 253, 255, .55); backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, .62); border-radius: 22px;
  box-shadow: 0 14px 44px rgba(10, 90, 128, .24), inset 0 1px 0 rgba(255, 255, 255, .7);
  padding: 18px 22px; z-index: 1000;
}
.legend-title { font-size: 11px; letter-spacing: .13em; text-transform: uppercase; font-weight: 700; color: var(--sea-deep); margin-bottom: 12px; }
.legend-rows { display: flex; flex-direction: column; gap: 12px; font-size: 13px; font-weight: 600; color: #33566b; }
.legend-row {
  transition: background .18s, box-shadow .18s; cursor: pointer; border-radius: 10px;
  padding: 4px 6px; margin: -4px -6px; display: flex; align-items: center; gap: 12px;
}
.legend-row:hover { background: rgba(34, 167, 216, .1); }
.legend-row.active { background: rgba(255, 196, 0, .16); box-shadow: 0 0 0 1px rgba(255, 196, 0, .4); }
.legend-icon-main {
  width: 24px; height: 24px; flex: none; border-radius: 8px;
  background: linear-gradient(145deg, var(--sea1), var(--sea2)); color: #fff;
  font-family: var(--font-heading); font-weight: 700; font-size: 12px;
  display: grid; place-items: center; box-shadow: 0 2px 8px rgba(34, 167, 216, .5);
}
.legend-icon-sec {
  width: 22px; height: 22px; flex: none; border: 3px solid var(--sea2); border-radius: 50%;
  background: rgba(255, 255, 255, .9); box-shadow: 0 0 0 3px rgba(34, 167, 216, .16);
}
.legend-icon-zone {
  width: 22px; height: 22px; flex: none; border: 1.5px dashed #e06a5f; border-radius: 7px;
  background: rgba(224, 106, 95, .16);
}

/* Zoom hint */
.zoom-hint {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 1000;
  background: linear-gradient(145deg, rgba(15, 127, 176, .92), rgba(10, 90, 128, .92));
  color: #eaf7fc; font-size: 14px; font-weight: 600; letter-spacing: .01em;
  padding: 12px 24px; border-radius: 999px; display: flex; align-items: center; gap: 11px;
  box-shadow: 0 8px 26px rgba(10, 90, 128, .42), inset 0 1px 0 rgba(255, 255, 255, .2);
  backdrop-filter: blur(8px); max-width: calc(100vw - 40px); text-align: center;
}
.zoom-hint-dot { width: 8px; height: 8px; background: #8fe6ff; border-radius: 50%; flex: none; box-shadow: 0 0 8px #8fe6ff; }

/* Detail panel */
.detail-panel {
  position: absolute; top: 112px; right: 20px; width: 456px;
  max-height: calc(100% - 132px); display: flex; flex-direction: column;
  background: rgba(250, 253, 255, .62); backdrop-filter: blur(22px) saturate(1.45); -webkit-backdrop-filter: blur(22px) saturate(1.45);
  border: 1px solid rgba(255, 255, 255, .65); border-radius: 24px;
  box-shadow: 0 18px 50px rgba(10, 90, 128, .28), inset 0 1px 0 rgba(255, 255, 255, .7);
  z-index: 1050; overflow: hidden;
  animation: panelIn .34s cubic-bezier(.2, .8, .2, 1);
}
.detail-head {
  flex: none; display: flex; align-items: flex-start; gap: 12px;
  padding: 20px 22px 15px; border-bottom: 1px solid rgba(15, 127, 176, .18);
}
.detail-head-main { flex: 1; min-width: 0; }
.detail-region-row { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; flex-wrap: wrap; }
.detail-region-label { font-size: 11px; letter-spacing: .13em; text-transform: uppercase; font-weight: 700; color: var(--sea2); }
.detail-sig-badge {
  font-family: var(--font-heading); font-weight: 700; font-size: 11px; letter-spacing: .05em; color: #fff;
  background: linear-gradient(145deg, var(--sea1), var(--sea2)); padding: 2px 9px; border-radius: 999px;
  box-shadow: 0 2px 8px rgba(34, 167, 216, .45);
}
.detail-title { font-size: 29px; line-height: 1.06; color: #153044; }
.detail-loc { font-size: 13px; font-weight: 600; color: #5c7889; margin-top: 4px; }
.detail-close {
  flex: none; width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center;
  font-size: 22px; color: var(--sea-deep); cursor: pointer; border: 1px solid rgba(34, 167, 216, .35);
  background: rgba(255, 255, 255, .6); transition: all .18s;
}
.detail-close:hover { background: #fff; box-shadow: 0 0 0 3px rgba(34, 167, 216, .22); }
.detail-body { flex: 1; overflow-y: auto; padding: 18px 22px 24px; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tag-trophy {
  font-size: 12px; font-weight: 700; padding: 5px 13px; border-radius: 999px;
  background: linear-gradient(145deg, var(--sea1), var(--sea2)); color: #fff;
  box-shadow: 0 3px 12px rgba(34, 167, 216, .45);
}
.tag-level { font-size: 12px; font-weight: 700; padding: 5px 13px; border-radius: 999px; border: 1px solid var(--sea2); color: var(--sea2); }
.detail-blurb { font-size: 15px; line-height: 1.58; margin: 0 0 18px; color: #33505f; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
.detail-card { background: rgba(255, 255, 255, .5); border: 1px solid rgba(15, 127, 176, .16); border-radius: 14px; padding: 12px 14px; }
.detail-card.span-2 { grid-column: 1 / -1; }
.detail-card-label { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--sea2); margin-bottom: 4px; }
.detail-card-value { font-size: 14px; font-weight: 600; line-height: 1.3; color: #274152; }
.detail-section { margin-bottom: 18px; }
.detail-section-label { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--sea-deep); margin-bottom: 9px; }
.detail-pill-row { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-secondary { font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, .55); border: 1px solid rgba(15, 127, 176, .2); color: #3a5666; }
.tag-lodging { font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 999px; background: rgba(34, 167, 216, .14); border: 1px solid rgba(34, 167, 216, .3); color: var(--sea-deep); }
.detail-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.detail-list-item { display: flex; gap: 9px; font-size: 13.5px; font-weight: 600; line-height: 1.42; color: #3a5666; }
.detail-list-item::before { content: '▸'; color: var(--sea1); flex: none; }
.detail-rules-box { padding: 13px 15px; border-radius: 16px; background: rgba(224, 106, 95, .1); border: 1px solid rgba(224, 106, 95, .4); }
.detail-rules-label { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: #c0554a; margin-bottom: 5px; }
.detail-rules-text { font-size: 13.5px; font-weight: 600; line-height: 1.48; color: #9a463d; }

/* ---------------------------------------------------------------- */
/* Responsive (public website usage on tablet / mobile)             */
/* ---------------------------------------------------------------- */
@media (max-width: 860px) {
  .header { padding: 12px 16px; gap: 14px; }
  .brand-logo { height: 46px; }
  .title { font-size: 21px; }
  .eyebrow { font-size: 9px; }
  .btn-reset { padding: 10px 16px; font-size: 13px; }

  .filter-panel, .legend-panel { width: calc(100% - 32px); max-width: 322px; }
  .filter-panel { top: 96px; left: 16px; max-height: calc(100% - 116px); }
  .legend-panel { left: 16px; bottom: 16px; padding: 14px 18px; }

  .detail-panel {
    top: auto; bottom: 0; left: 0; right: 0; width: 100%;
    max-height: 72vh; border-radius: 24px 24px 0 0;
    animation: panelInUp .3s cubic-bezier(.2, .8, .2, 1);
  }
  .zoom-hint { bottom: 12px; font-size: 12.5px; padding: 10px 18px; }
}

@media (max-width: 520px) {
  .header-brand { gap: 10px; }
  .eyebrow { display: none; }
  .brand-logo { height: 38px; }
  .title { font-size: 18px; }
  .filter-panel { width: calc(100% - 24px); left: 12px; top: 82px; }
  .legend-panel { width: calc(100% - 24px); left: 12px; bottom: 12px; }
  .detail-panel { max-height: 78vh; }
  .detail-title { font-size: 23px; }
  .detail-grid { grid-template-columns: 1fr; }
}
