body:has(#play:not([hidden])) {
  isolation: isolate;
}

body:has(#play:not([hidden]))::before {
  display: block;
  background: linear-gradient(#06131d29, #06131d72), var(--scene) center / cover;
  pointer-events: none;
}

#game .hero {
  aspect-ratio: auto;
  min-height: clamp(180px, 26vh, 260px);
  background: none;
  padding: 10px 2px;
}

#game .hero-content {
  width: 100%;
}

#game .hero h1,
#game .hero h2 {
  color: #fff;
  text-shadow: 0 2px 5px #031018, 0 0 12px #031018;
}

#game .stat,
#game article,
#game .policy-choice,
#game .hero .eta17 {
  background: #07192351;
  border: 1px solid #bceeff80;
  box-shadow: inset 0 0 9px #bceeff17, 0 2px 8px #02101742;
  text-shadow: 0 1px 3px #001018, 0 0 5px #001018, 0 0 9px #001018;
}

#game .stat {
  padding: 8px;
}

#game .stat small,
#game .stat b,
#game .hero .eta17 small,
#game article small,
#game .detail-hint {
  color: #fff;
}

#game .hero .eta17 {
  margin: 8px 0 0;
  box-sizing: border-box;
}

#game .hero .eta17 strong,
#game .moon-icon {
  color: #ffe29a;
  text-shadow: 0 1px 4px #241503, 0 0 12px #ffbb4a90;
}

#game .moon-icon {
  font-size: 20px;
  line-height: 1;
  vertical-align: middle;
}

#game .delta16 {
  color: #edf6fa;
}

#game .popnews17 {
  background: #04141d6e;
}

#game .war-alert {
  background: #481f22b5;
  border-color: #ffae9a;
}

.choice-effect {
  display: block;
  width: fit-content;
  margin-top: 4px;
  padding: 2px 7px;
  border: 1px solid rgba(189, 223, 255, .36);
  border-radius: 6px;
  background: rgba(12, 27, 44, .66);
  color: #ceebff;
  font-size: .75rem;
  font-weight: 500;
  line-height: 1.35;
}

body.lunar-clear:has(#play:not([hidden]))::before {
  background: radial-gradient(ellipse at 50% 15%, #1c354d, #080f19 65%);
}

.lunar-result {
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid #e5c37e77;
  border-radius: 16px;
  background: #0c1928;
  box-shadow: 0 16px 40px #0006;
}

.lunar-heading {
  padding: 22px 12px 20px;
  text-align: center;
}

.lunar-heading p {
  margin: 0;
  color: #bad6eb;
  font-size: .85rem;
  letter-spacing: .12em;
}

.lunar-heading h1 {
  margin: 6px 0;
  color: #fff5df;
  font-size: clamp(1.8rem, 9vw, 3rem);
  letter-spacing: .08em;
}

.lunar-heading strong {
  color: #ffda89;
}

.lunar-scene {
  display: block;
  width: 100%;
  height: clamp(110px, 24vw, 175px);
  object-fit: cover;
}

.lunar-details {
  padding: clamp(12px, 4vw, 22px);
}

.lunar-details label {
  display: block;
  margin-top: 8px;
}

.lunar-details input {
  margin-top: 4px;
}

.lunar-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.lunar-details button,
.lunar-actions a {
  box-sizing: border-box;
  padding: 11px 6px;
  border: 1px solid #8ba7bd;
  border-radius: 9px;
  background: #172c41;
  color: #edf5fc;
  text-align: center;
  font-size: .875rem;
  line-height: 1.4;
}

.lunar-actions button {
  margin: 0;
}

.lunar-details > button {
  margin-top: 10px;
}

#game .policy-choice.lunar-policy {
  border-color: #ffd77a;
  background: #33250bf0;
  box-shadow: 0 0 12px #ffc75250;
}

#game .policy-choice.lunar-policy.picked {
  background: #61471d;
}

#game .lunar-policy .choice-effect {
  border-color: #ffd77a;
  color: #ffe4a3;
}

#game .choice-preview {
  display: block;
  margin-top: 5px;
  color: #e4f1fc;
  font-size: .75rem;
  line-height: 1.4;
}

.choice-preview span {
  display: inline-block;
  margin-inline-start: .2em;
}

#game .world-news .news-headline {
  color: #ffdfa0;
  font-size: 1rem;
  font-weight: 700;
  margin: 4px 0;
}

#game .world-news .news-reason {
  color: #ffd0c4;
  font-size: .86rem;
  margin-bottom: 6px;
}

#game .world-news .news-population {
  color: #e0f4ff;
  font-size: .8rem;
}

#game .news-details summary {
  padding: 6px 0;
  color: #bcddf6;
  cursor: pointer;
}

.news-details ul {
  margin: 2px 0 8px;
  padding-inline-start: 1.4em;
}

.news-details li + li {
  margin-top: 4px;
}
