* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #f0f2f5;
  color: #1a1a2e;
}

.viz {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.25rem 1rem 2rem;
}

.viz__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.viz__header h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
}

.viz__tabs {
  display: flex;
  gap: 0.35rem;
}

.viz__tab {
  padding: 0.45rem 0.9rem;
  border: 1px solid #c5cad3;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 0.85rem;
}

.viz__tab--active {
  background: #e8f5e9;
  border-color: #3cb044;
  font-weight: 600;
}

.viz__controls {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
  padding: 1rem;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e0e4ea;
}

.viz__slider {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
}

.viz__slider input[type="range"] {
  width: 100%;
}

.viz__fixed {
  font-size: 0.8rem;
  color: #5c6370;
}

.viz__scale-note {
  font-size: 0.85rem;
  color: #5c6370;
  text-align: center;
  margin: 0 0 1rem;
}

.viz__panels {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.viz__panel {
  margin: 0;
  text-align: center;
}

.viz__panel figcaption {
  font-size: 0.8rem;
  color: #5c6370;
  margin-bottom: 0.4rem;
}

.viz__panel canvas {
  display: block;
  border: 1px solid #d0d5dd;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}

.viz__zoom-wrapper {
  position: relative;
  display: inline-block;
}

.viz__panel__3d {
  display: block;
  width: 280px;
  height: 280px;
  border: 1px solid #d0d5dd;
  border-radius: 4px;
  background: #fff;
  cursor: grab;
}

.viz__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.65rem;
}

.stat-card {
  background: #fff;
  border: 1px solid #e0e4ea;
  border-radius: 8px;
  padding: 0.75rem 1rem;
}

.stat-card__label {
  font-size: 0.75rem;
  color: #5c6370;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stat-card__value {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 0.25rem;
}

.viz__back-btn {
  display: block;
  margin: 0.4rem auto 0;
}
