:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ink: #23384d;
  --ink-soft: #526778;
  --blue: #7195b9;
  --blue-deep: #355f86;
  --blue-pale: #dce7f0;
  --paper: #f8f8f5;
  --paper-blue: #eef3f6;
  --line: #ccd8e0;
  --warm: #d98953;
  --warm-pale: #f1dcc2;
  background: var(--paper);
  color: var(--ink);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  align-items: center;
  background: rgba(248, 248, 245, 0.97);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 32px;
  height: 92px;
  justify-content: space-between;
  padding: 0 5vw;
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  align-items: center;
  display: flex;
  color: var(--ink);
  font-size: 22px;
  font-weight: 800;
  gap: 9px;
  letter-spacing: 0;
}

.brand img {
  height: 68px;
  width: 68px;
}

nav {
  display: flex;
  gap: 26px;
  margin-left: auto;
}

nav a,
.studio-link {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

nav a:hover,
.studio-link:hover {
  color: var(--blue-deep);
}

.studio-link {
  border-left: 1px solid var(--line);
  padding-left: 24px;
}

.language-switch {
  align-items: center;
  display: flex;
  gap: 2px;
}

.language-switch button {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  padding: 7px 5px 5px;
}

.language-switch button.active {
  border-bottom-color: var(--warm);
  color: var(--ink);
}

.explorer-hero {
  min-height: min(740px, calc(100vh - 92px));
  overflow: hidden;
  position: relative;
}

.public-map,
.map-tiles,
.map-pin-layer {
  inset: 0;
  position: absolute;
}

.public-map {
  background: var(--blue-pale);
  cursor: grab;
  overflow: hidden;
  touch-action: none;
}

.public-map.dragging {
  cursor: grabbing;
}

.map-tiles {
  filter: grayscale(1) contrast(0.88) brightness(1.05);
  opacity: 0.88;
}

.map-tile {
  height: 256px;
  position: absolute;
  width: 256px;
}

.map-pin-layer {
  pointer-events: none;
}

.map-pin {
  background: var(--warm);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 9px rgba(20, 30, 29, 0.35);
  cursor: pointer;
  height: 22px;
  pointer-events: auto;
  position: absolute;
  transform: translate(-50%, -50%);
  width: 22px;
}

.map-pin.active {
  background: var(--blue-deep);
  height: 28px;
  width: 28px;
}

.map-controls {
  display: grid;
  gap: 6px;
  left: 20px;
  position: absolute;
  top: 20px;
  z-index: 3;
}

.map-controls button {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  font-size: 20px;
  font-weight: 700;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.map-attribution {
  background: rgba(255, 255, 255, 0.84);
  bottom: 0;
  color: var(--ink-soft);
  font-size: 10px;
  margin: 0;
  padding: 3px 7px;
  position: absolute;
  right: 0;
}

.eyebrow {
  color: var(--blue-deep);
  font-size: 11px;
  font-weight: 800;
  margin: 0 0 8px;
}

.primary-link {
  align-items: center;
  background: var(--warm);
  border-radius: 4px;
  color: #26394b;
  display: inline-flex;
  font-size: 14px;
  font-weight: 800;
  gap: 8px;
  padding: 12px 15px;
}

.map-explorer {
  background: rgba(248, 248, 245, 0.97);
  border-left: 1px solid var(--line);
  bottom: 0;
  overflow-y: auto;
  padding: 22px;
  position: absolute;
  right: 0;
  top: 0;
  width: min(390px, 34vw);
  z-index: 4;
}

.explorer-heading,
.section-heading {
  align-items: start;
  display: flex;
  gap: 22px;
  justify-content: space-between;
}

h2,
h3 {
  letter-spacing: 0;
}

h2 {
  font-size: 30px;
  line-height: 1.08;
  margin: 0;
}

h3 {
  font-size: 17px;
  margin: 0;
}

.count-badge {
  background: var(--blue-pale);
  border-radius: 16px;
  color: var(--blue-deep);
  font-size: 13px;
  font-weight: 800;
  min-width: 30px;
  padding: 6px 9px;
  text-align: center;
}

.search-field,
.select-field {
  color: var(--ink-soft);
  display: grid;
  font-size: 11px;
  font-weight: 800;
  gap: 5px;
  margin-top: 15px;
}

input,
select {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  min-height: 40px;
  padding: 0 11px;
}

.story-preview-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.story-preview {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  cursor: pointer;
  padding: 13px;
  text-align: left;
}

.story-preview:hover,
.story-preview.active {
  border-color: var(--blue);
}

.story-preview strong {
  display: block;
  font-size: 14px;
  line-height: 1.25;
}

.story-preview span,
.story-preview small {
  color: var(--ink-soft);
  display: block;
  font-size: 11px;
  line-height: 1.45;
  margin-top: 6px;
}

.story-preview small {
  color: #a45b2e;
  font-weight: 800;
}

.catalog-section,
.app-section {
  padding: 78px 7vw;
}

.catalog-section {
  background: var(--paper);
}

.section-heading > p {
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0;
  max-width: 520px;
}

.section-heading .eyebrow,
.app-section .eyebrow {
  color: var(--blue);
}

.catalog-filters {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  margin-top: 30px;
}

.catalog-filters label {
  margin: 0;
}

.package-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 22px;
}

.package-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  min-height: 230px;
  padding: 18px;
  text-align: left;
}

.package-card:hover,
.package-card.active {
  border-color: var(--blue);
  box-shadow: 0 4px 18px rgba(53, 95, 134, 0.1);
}

.package-meta,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.package-meta {
  color: var(--ink-soft);
  font-size: 11px;
  margin-top: 13px;
}

.package-card p {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
  min-height: 40px;
}

.tag-list span {
  background: var(--blue-pale);
  border-radius: 3px;
  color: var(--blue-deep);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 6px;
}

.price {
  color: var(--blue-deep);
  display: block;
  font-size: 20px;
  font-weight: 800;
  margin-top: 16px;
}

.price del {
  color: #8a9997;
  font-size: 13px;
  margin-right: 5px;
}

.package-detail {
  background: var(--paper-blue);
  border-left: 4px solid var(--blue);
  margin-top: 18px;
  padding: 18px;
}

.package-detail p {
  color: var(--ink-soft);
  line-height: 1.55;
}

.package-detail button {
  background: var(--blue-deep);
  border: 0;
  border-radius: 4px;
  color: #fff;
  font-weight: 800;
  padding: 11px 14px;
}

.empty-state {
  border: 1px dashed #aabac7;
  color: var(--ink-soft);
  grid-column: 1 / -1;
  line-height: 1.6;
  padding: 26px;
}

.app-section {
  background: var(--ink);
  color: #fff;
}

.app-section h2 {
  max-width: 560px;
}

.app-points {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 42px;
}

.app-points article {
  border-top: 1px solid #6c8193;
  padding-top: 18px;
}

.app-points strong {
  color: var(--warm);
  display: block;
  font-size: 13px;
  margin-bottom: 22px;
}

.app-points p {
  color: #d5e0e7;
  line-height: 1.55;
}

footer {
  align-items: center;
  background: #192d40;
  color: #d6e2ea;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 24px 7vw;
}

footer p {
  font-size: 12px;
  margin: 0;
}

.footer-brand img {
  height: 46px;
  width: 46px;
}

@media (max-width: 900px) {
  nav {
    display: none;
  }

  .studio-link {
    border-left: 0;
    padding-left: 0;
  }

  .explorer-hero {
    display: grid;
    min-height: auto;
  }

  .public-map {
    height: 520px;
    position: relative;
  }

  .map-explorer {
    border-left: 0;
    overflow: visible;
    padding: 24px 5vw 30px;
    position: static;
    width: auto;
  }

  .story-preview-list {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  }

  .section-heading {
    display: grid;
  }
}

@media (max-width: 620px) {
  .site-header {
    height: 78px;
    padding: 0 4vw;
  }

  .brand {
    font-size: 15px;
  }

  .brand img {
    height: 56px;
    width: 56px;
  }

  .studio-link {
    font-size: 11px;
  }

  .public-map {
    height: 490px;
  }

  .catalog-section,
  .app-section {
    padding: 52px 5vw;
  }

  .catalog-filters,
  .app-points {
    grid-template-columns: 1fr;
  }

  footer {
    align-items: start;
    display: grid;
    padding: 21px 5vw;
  }
}
