:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  min-height: 100%;
  overflow: hidden;
}

body {
  background: #07080c;
  color: #f8fafc;
}

.model-app {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
  background:
    radial-gradient(circle at 68% 24%, rgba(186, 143, 98, 0.20), transparent 34%),
    radial-gradient(circle at 30% 78%, rgba(86, 116, 152, 0.16), transparent 38%),
    linear-gradient(135deg, #07080c, #10141c 46%, #090a0e);
}

#human-scene {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  cursor: grab;
}

#human-scene:active { cursor: grabbing; }

.topbar,
.info-panel,
.zoom-stack button {
  border: 1px solid rgba(236, 228, 216, 0.16);
  background: rgba(9, 12, 17, 0.64);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(18px);
}

.topbar {
  position: fixed;
  z-index: 8;
  left: 14px;
  right: 14px;
  top: 12px;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
}

.topbar strong {
  color: #fff;
  font-size: 0.98rem;
  white-space: nowrap;
}

.app-link,
.topbar button,
.zoom-stack button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(236, 228, 216, 0.16);
  border-radius: 8px;
  background: rgba(20, 24, 31, 0.72);
  color: #f6eadb;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 850;
  text-decoration: none;
  padding: 0 11px;
  cursor: pointer;
  white-space: nowrap;
}

.app-link:hover,
.topbar button:hover,
.topbar button.active,
.zoom-stack button:hover {
  border-color: rgba(238, 188, 132, 0.72);
  color: #fff8ef;
  background: rgba(238, 188, 132, 0.18);
}

.readout {
  margin-left: auto;
  color: #c6c2bc;
  font-size: 0.86rem;
  white-space: nowrap;
}

.readout b { color: #fff; }

.info-panel {
  position: fixed;
  z-index: 6;
  left: 18px;
  top: 92px;
  width: min(400px, calc(100vw - 36px));
  padding: 16px;
  border-radius: 8px;
}

#mode-label {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 9px;
  border: 1px solid rgba(238, 188, 132, 0.34);
  border-radius: 999px;
  background: rgba(238, 188, 132, 0.12);
  color: #ffd6a8;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#model-title {
  margin: 12px 0 0;
  color: #fff;
  font-size: clamp(2.1rem, 4.6vw, 3.45rem);
  line-height: 0.92;
  letter-spacing: 0;
}

#model-copy {
  margin: 12px 0 0;
  color: #d7d1c8;
  font-size: 0.98rem;
  line-height: 1.5;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 15px;
}

.stat-grid article,
.feature-list article {
  min-height: 62px;
  padding: 10px;
  border: 1px solid rgba(236, 228, 216, 0.11);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), transparent 58%),
    rgba(18, 21, 27, 0.58);
}

.stat-grid span,
.detail-meter span,
.feature-list span {
  color: #aba39a;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stat-grid b,
.feature-list b {
  display: block;
  margin-top: 7px;
  color: #f8fafc;
  font-size: 0.95rem;
  line-height: 1.2;
}

.detail-meter {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(236, 228, 216, 0.11);
  border-radius: 8px;
  background: rgba(19, 18, 17, 0.56);
}

.detail-meter i {
  display: block;
  height: 8px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 141, 132, 0.2);
}

.detail-meter em {
  display: block;
  width: 64%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #e8b986, #f3d8bb, #9db5d2);
  box-shadow: 0 0 18px rgba(238, 188, 132, 0.5);
  transition: width 180ms ease;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
}

.feature-list span {
  display: block;
  margin-top: 5px;
  line-height: 1.35;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 650;
}

.zoom-stack {
  position: fixed;
  z-index: 7;
  right: 18px;
  top: 82px;
  display: flex;
  gap: 8px;
}

.zoom-stack button {
  width: 44px;
  height: 44px;
  padding: 0;
  font-size: 1.42rem;
}

.hint {
  position: fixed;
  z-index: 5;
  right: 18px;
  bottom: 18px;
  max-width: 370px;
  margin: 0;
  color: rgba(229, 224, 216, 0.84);
  font-size: 0.84rem;
  line-height: 1.45;
  text-align: right;
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.8);
}

@media (max-width: 940px) {
  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .readout {
    width: 100%;
    margin-left: 0;
  }

  .info-panel {
    top: 138px;
  }
}

@media (max-width: 640px) {
  html,
  body {
    overflow: auto;
  }

  .model-app {
    min-height: 100svh;
    padding-bottom: 180px;
  }

  .topbar {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    margin: 10px;
  }

  .info-panel {
    position: relative;
    left: auto;
    top: auto;
    width: calc(100% - 20px);
    margin: 12px 10px 0;
  }

  .stat-grid,
  .feature-list {
    grid-template-columns: 1fr;
  }

  .zoom-stack {
    top: auto;
    right: 10px;
    bottom: 86px;
  }

  .hint {
    right: 10px;
    bottom: 18px;
    left: 10px;
    max-width: none;
  }
}
