body {
  background: radial-gradient(circle at top left, #eef5ff, #f8fbff 45%, #fcfdff);
  color: #1f2937;
}

.container {
  max-width: 1080px;
}

.treasure-header {
  background: linear-gradient(130deg, #0c3b66, #1f5b8f, #2a7da6);
  color: #f8fbff;
  border-radius: 14px;
  padding: 1rem 1.15rem;
  box-shadow: 0 10px 24px rgba(14, 61, 108, 0.24);
}

.treasure-card {
  background: #ffffff;
  border: 1px solid #dbe7f3;
  border-radius: 14px;
  box-shadow: 0 10px 20px rgba(20, 57, 96, 0.08);
}

.civ-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(90px, 1fr));
  gap: 0.55rem;
}

.civ-tile {
  border: 1px solid #dae5f2;
  border-radius: 12px;
  background: #fbfdff;
  padding: 0.4rem;
  text-align: center;
}

.civ-badge {
  width: 58px;
  height: 58px;
  margin: 0 auto 0.35rem;
  border-radius: 999px;
  border: 2px solid #d2e0f0;
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.civ-name {
  font-size: 0.74rem;
  color: #334155;
  line-height: 1.2;
  margin-bottom: 0.25rem;
  min-height: 2.7rem;
}

.target-input {
  min-width: 0;
}

.result-value {
  font-size: clamp(1.2rem, 2.2vw, 1.7rem);
  font-weight: 700;
  color: #0f4c81;
  margin-bottom: 0.45rem;
}

.result-sub {
  color: #475569;
  margin-bottom: 0.18rem;
}

.result-warning {
  color: #9a3412;
  font-weight: 600;
}

.result-note {
  font-size: 0.88rem;
  color: #64748b;
}

.runtime-warning {
  border: 1px solid #f5c2c7;
  background: #fff1f2;
  color: #b42318;
  border-radius: 12px;
  padding: 0.8rem 0.95rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.treasure-back-link {
  color: #174781;
  font-weight: 600;
  text-decoration: none;
}

.treasure-back-link:hover {
  color: #0f2f59;
  text-decoration: underline;
}

@media (max-width: 860px) {
  .civ-grid {
    grid-template-columns: repeat(4, minmax(70px, 1fr));
  }
}

@media (max-width: 560px) {
  .civ-grid {
    grid-template-columns: repeat(3, minmax(70px, 1fr));
  }
}
