:root {
  --bg: #0e1218;
  --panel: rgba(18, 24, 37, 0.9);
  --panel-border: rgba(203, 181, 149, 0.18);
  --text: #f5efe7;
  --muted: #c8baa8;
  --accent: #8ad9d2;
  --accent-2: #f5c97a;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(84, 139, 183, 0.22), transparent 32%),
    radial-gradient(circle at top right, rgba(225, 155, 68, 0.2), transparent 28%),
    linear-gradient(180deg, #121924 0%, #06080d 100%);
  color: var(--text);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
}

.panel {
  background: var(--panel);
  backdrop-filter: blur(18px);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
}

.status-panel {
  padding: 28px;
  border-right: 1px solid var(--panel-border);
}

.eyebrow {
  margin-bottom: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.lede {
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.6;
}

.supporting-copy {
  margin-top: 14px;
  color: #efe4d3;
  line-height: 1.7;
}

.control-grid,
.stats-grid {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.control-card,
.stat-card {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.control-card span,
.stat-label,
.image-label {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

input[type="range"],
select,
button {
  width: 100%;
}

select,
button {
  border: 0;
  border-radius: 16px;
  padding: 13px 14px;
  font: inherit;
}

input[type="range"] {
  accent-color: var(--accent);
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}

.primary-button {
  background: linear-gradient(135deg, #9be6db, #5fbfd4);
  color: #0a1720;
  font-weight: 700;
  cursor: pointer;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
}

.stat-card strong {
  font-size: 1.8rem;
}

.source-note {
  margin-top: 24px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(245, 201, 122, 0.09);
  color: #f4e8d9;
  line-height: 1.6;
  font-size: 0.95rem;
}

.scene-shell {
  position: relative;
  min-height: 100vh;
}

.scene-root {
  position: absolute;
  inset: 0;
}

.scene-hud {
  position: absolute;
  top: 18px;
  left: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  z-index: 3;
}

.hud-chip {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(16, 21, 31, 0.72);
  border: 1px solid rgba(245, 201, 122, 0.12);
  font-size: 0.88rem;
}

.info-panel {
  position: absolute;
  top: 18px;
  right: 18px;
  width: min(420px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 22px;
  z-index: 3;
}

.info-subtitle,
#summaryText,
.loading-note {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.meta-grid,
.image-grid,
.link-row {
  display: grid;
  gap: 12px;
}

.meta-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.meta-pill {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.meta-pill strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.image-grid {
  grid-template-columns: 1fr 1fr;
  margin-top: 20px;
}

.image-card {
  display: grid;
  gap: 10px;
}

.image-card a {
  display: block;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  min-height: 150px;
}

.image-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.copy-block {
  margin-top: 22px;
}

.copy-block h3 {
  font-size: 1rem;
}

.text-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.text-link:hover {
  text-decoration: underline;
}

.link-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.loading-note {
  margin-top: 18px;
  font-size: 0.92rem;
}

@media (max-width: 1200px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .status-panel {
    border-right: 0;
    border-bottom: 1px solid var(--panel-border);
  }

  .scene-shell {
    min-height: 72vh;
  }

  .info-panel {
    position: static;
    width: auto;
    max-height: none;
    margin: 18px;
  }

  .scene-hud {
    top: auto;
    bottom: 18px;
  }
}

@media (max-width: 720px) {
  .status-panel,
  .info-panel {
    padding: 18px;
  }

  .button-row,
  .meta-grid,
  .image-grid,
  .link-row {
    grid-template-columns: 1fr;
  }
}
