:root {
  --ink: #12202a;
  --muted: #5a6b76;
  --line: #d5dde3;
  --bg: #f3f6f8;
  --paper: #ffffff;
  --brand: #0a5c6b;
  --brand-dark: #063a44;
  --accent: #c45c26;
  --gw: #0a5c6b;
  --rep: #c45c26;
  --soft: #e8f1f3;
}

* { box-sizing: border-box; }

html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, #d9ecef 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #efe6dc 0%, transparent 45%),
    var(--bg);
  font-family: "Manrope", "Segoe UI", sans-serif;
  line-height: 1.5;
  min-height: 100vh;
}

img, svg, video { max-width: 100%; height: auto; }

a { color: var(--brand); }
a:hover { color: var(--brand-dark); }

.wrap {
  width: min(1120px, calc(100% - 1.5rem));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(243, 246, 248, 0.92);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
}

.brand strong {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--brand-dark);
}

.brand span {
  font-size: 0.72rem;
  color: var(--muted);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}

.nav a, .btn-print {
  text-decoration: none;
  color: var(--ink);
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}

.nav a:hover, .btn-print:hover { background: var(--soft); }
.nav a.active {
  background: var(--brand);
  color: #fff;
}
.btn-print {
  background: var(--brand-dark);
  color: #fff;
}
.btn-print:hover { background: var(--brand); color: #fff; }

.hero { padding: 1.6rem 0 1rem; }

.hero h1 {
  margin: 0 0 0.55rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.35rem, 3.6vw, 2rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--brand-dark);
  max-width: none;
}

.hero p {
  margin: 0;
  max-width: 52ch;
  color: var(--muted);
  font-size: 1.02rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 1rem;
  margin: 1rem 0 1.75rem;
}

.card, .section-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem 1.05rem;
  box-shadow: 0 10px 30px rgba(18, 32, 42, 0.04);
}

.card h2, .section h2, .section-card h2 {
  margin: 0 0 0.65rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.15rem, 3vw, 1.35rem);
  color: var(--brand-dark);
}

.card h3, .section h3, .section-card h3 {
  margin: 1rem 0 0.4rem;
  font-size: 1rem;
  color: var(--ink);
}

.links { display: grid; gap: 0.65rem; }

.link-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  background: linear-gradient(180deg, #fff, #f7fafb);
}

.link-card:hover { border-color: var(--brand); }
.link-card strong {
  display: block;
  color: var(--brand-dark);
  margin-bottom: 0.15rem;
}
.link-card span { color: var(--muted); font-size: 0.9rem; }

#map {
  height: min(62vh, 560px);
  min-height: 280px;
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  z-index: 1;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin-top: 0.75rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 0.3rem;
  vertical-align: middle;
}
.dot.gw { background: var(--gw); }
.dot.rep { background: var(--rep); }

.section { margin: 0 0 1.5rem; }

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--paper);
}

table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: var(--paper);
}

th, td {
  border: 1px solid var(--line);
  padding: 0.5rem 0.6rem;
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--soft);
  color: var(--brand-dark);
  position: sticky;
  top: 0;
}

.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  color: #fff;
  white-space: nowrap;
}
.tag.gw { background: var(--gw); }
.tag.rep { background: var(--rep); }

.note {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.kpi {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.55rem;
  margin: 0.8rem 0 1rem;
}
.kpi div {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem;
  text-align: center;
  background: var(--paper);
}
.kpi b {
  display: block;
  font-size: 1.05rem;
  color: var(--brand);
  margin-bottom: 0.15rem;
}
.kpi span { font-size: 0.75rem; color: var(--muted); }

.story {
  margin: 0.15rem 0 1.1rem;
  padding: 0.35rem 0 0.15rem;
}

.story > h2 {
  margin: 0 0 0.85rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.2rem, 3vw, 1.45rem);
  color: var(--brand-dark);
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem 1.5rem;
}

.story-grid h3 {
  margin: 0 0 0.35rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--brand);
}

.story-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 36ch;
}

.story-foot {
  margin: 1rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.story-foot b { color: var(--ink); }

.mount-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 0.85rem;
}

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

.mount-grid--1 {
  grid-template-columns: minmax(0, 28rem);
}

.mount-shot {
  margin: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.mount-shot img {
  width: 100%;
  max-height: 22rem;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center;
  display: block;
  background: #f4f7f8;
}

.mount-shot figcaption {
  padding: 0.35rem 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
  background: #f8fbfc;
}

.bom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.bom-item {
  display: grid;
  grid-template-columns: minmax(0, 9.5rem) minmax(0, 1fr);
  gap: 0.85rem;
  align-items: start;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.bom-item:first-of-type { border-top: 0; padding-top: 0.35rem; }

.bom-item-media {
  margin: 0;
  background: #f4f7f8;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.bom-item-media img {
  display: block;
  width: 100%;
  max-height: 8.5rem;
  object-fit: contain;
  object-position: center;
  background: #f4f7f8;
}

.bom-item-media--text {
  min-height: 7rem;
  display: grid;
  place-items: center;
}

.bom-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 1rem;
  text-align: center;
  color: var(--brand-dark);
}

.bom-placeholder strong {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.55rem;
  font-weight: 650;
}

.bom-placeholder span {
  color: var(--muted);
  font-size: 0.9rem;
}

.bom-role {
  margin: 0 0 0.2rem;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.bom-item-body h3 {
  margin: 0 0 0.45rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--brand-dark);
}

.bom-item-body p { margin: 0 0 0.55rem; color: var(--ink); }

.bom-item-body ul {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.bom-price {
  margin: 0 0 0.55rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.bom-price span {
  font-weight: 700;
  color: var(--accent);
  font-size: 1.15rem;
}

.bom-link {
  display: inline-flex;
  align-items: center;
  margin: 0.15rem 0.55rem 0.15rem 0;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: var(--soft);
  border: 1px solid #c5d7dc;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--brand-dark);
}

.bom-link:hover {
  background: #dcecef;
  color: var(--brand-dark);
}

.bom-item .mount-grid--1 {
  grid-template-columns: minmax(0, 18rem);
}

.bom-item .mount-shot img {
  max-height: 10rem;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 0.5rem;
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  min-width: 0;
}

.table-wrap th,
.table-wrap td {
  border-bottom: 1px solid var(--line);
  padding: 0.55rem 0.4rem;
  text-align: left;
  vertical-align: top;
}

.table-wrap th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.footer {
  border-top: 1px solid var(--line);
  padding: 1.1rem 0 2rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.leaflet-control-container,
.leaflet-control-zoom,
.leaflet-control-attribution {
  display: none !important;
}

ul, ol { padding-left: 1.2em; }
li { margin-bottom: 0.25rem; }

.doc-sheet {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.1rem 1.15rem 1.4rem;
  margin: 1rem 0 1.5rem;
  box-shadow: 0 10px 30px rgba(18, 32, 42, 0.04);
}

@media (max-width: 860px) {
  .grid-2, .bom-grid, .story-grid { grid-template-columns: 1fr; }
  .bom-item { grid-template-columns: 1fr; }
  .mount-grid { grid-template-columns: 1fr 1fr; }
  .kpi { grid-template-columns: 1fr 1fr; }
  #map { height: 55vh; min-height: 260px; }
  .topbar-inner { padding: 0.65rem 0; }
  .nav a, .btn-print { padding: 0.4rem 0.65rem; font-size: 0.82rem; }
  .story-grid p { max-width: none; }
}

@media (max-width: 480px) {
  .wrap { width: calc(100% - 1rem); }
  .kpi { grid-template-columns: 1fr; }
  .hero { padding: 1.1rem 0 0.7rem; }
  table { min-width: 480px; font-size: 0.84rem; }
  .mount-grid { grid-template-columns: 1fr; }
}

@page {
  size: A4;
  margin: 12mm;
}

@media print {
  body {
    background: #fff;
    color: #000;
  }
  .topbar, .btn-print, .no-print { display: none !important; }
  .wrap { width: 100%; max-width: none; margin: 0; }
  .card, .section-card, .doc-sheet {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
  }
  #map {
    height: 420px;
    break-inside: avoid;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  a { color: inherit; text-decoration: none; }
  h2, h3, table, .kpi, .note { break-inside: avoid; }
  thead { display: table-header-group; }
  .table-wrap {
    overflow: visible;
    border: 0;
  }
  table { min-width: 0; font-size: 9.5pt; }
}
