:root {
  --color-bg: #f4f6f8;
  --color-surface: #ffffff;
  --color-accent: #1e5f9e;
  --color-text: #1a1a2e;
  --color-text-light: #555e6c;
  --color-footer-bg: #1a1a2e;
  --color-footer-text: #c8d0dc;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(0,0,0,0.10);
  --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid #e2e6ea;
  padding: 1rem 1.25rem;
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-main {
  height: 52px;
  width: auto;
  flex-shrink: 0;
}

.header-text h1 {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.2;
}

.subtitle {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-top: 0.15rem;
}

/* Zone tabs */
.zone-tabs {
  background: var(--color-surface);
  border-bottom: 2px solid #e2e6ea;
  padding: 0 1.25rem;
  display: flex;
  overflow-x: auto;
}

.zone-tab {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  padding: 0.85rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-light);
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--transition), border-color var(--transition);
}

.zone-tab:hover { color: var(--color-accent); }

.zone-tab.active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
  font-weight: 600;
}

/* Cards grid */
.zone-content {
  flex: 1;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 540px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 800px) {
  .cards-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Subzone card */
.subzone-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

.subzone-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.14);
}

.card-thumb {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

.card-thumb-empty {
  width: 100%;
  aspect-ratio: 4/3;
  background: #dde2e8;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  font-size: 0.8rem;
}

.card-info {
  padding: 0.75rem 1rem;
}

.card-name {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.card-date {
  font-size: 0.78rem;
  color: var(--color-text-light);
}

.card-badge {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.7rem;
  background: var(--color-accent);
  color: white;
  border-radius: 20px;
  padding: 0.1rem 0.55rem;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-inner {
  background: var(--color-surface);
  border-radius: var(--radius);
  max-width: 820px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.5rem;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--color-text-light);
}

.modal-close:hover { color: var(--color-text); }

.modal-title {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  padding-right: 2rem;
}

.modal-body img {
  width: 100%;
  border-radius: 6px;
  display: block;
}

.modal-body img-comparison-slider {
  width: 100%;
  border-radius: 6px;
  overflow: hidden;
}

.modal-date {
  margin-top: 0.75rem;
  font-size: 0.82rem;
  color: var(--color-text-light);
  text-align: right;
}

/* Footer */
.site-footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  padding: 1.5rem 1.25rem;
  margin-top: auto;
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

@media (min-width: 600px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-update { font-size: 0.8rem; }

.footer-credits {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-credits span { font-size: 0.78rem; }

.logo-credit {
  height: 36px;
  width: auto;
  object-fit: contain;
}

.no-data {
  color: var(--color-text-light);
  text-align: center;
  padding: 3rem 1rem;
  grid-column: 1 / -1;
  font-size: 0.95rem;
}
