* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Georgia, "Times New Roman", serif;
  color: #efe2d8;
  background:
    radial-gradient(circle at top left, rgba(120, 0, 0, 0.35), transparent 30%),
    radial-gradient(circle at top right, rgba(48, 0, 80, 0.32), transparent 32%),
    linear-gradient(135deg, #030203, #130406 55%, #020102);
}

.app {
  width: min(1240px, 95vw);
  margin: 0 auto;
  padding: 22px 0;
}

.hero,
.panel {
  background: rgba(12, 5, 7, 0.9);
  border: 1px solid rgba(255, 70, 70, 0.16);
  box-shadow:
    0 22px 70px rgba(0, 0, 0, 0.6),
    inset 0 0 42px rgba(120, 0, 0, 0.12);
}

.hero {
  padding: 32px;
  border-radius: 26px;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 10px;
  color: #c93b3b;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-weight: bold;
}

h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 68px);
  color: #f0c36a;
  text-shadow: 0 0 30px rgba(255, 60, 60, 0.22);
}

h2,
h3 {
  color: #e06a6a;
}

.subtitle,
#chapterText,
#sceneText,
#objectiveText,
#conditionBox {
  color: #cbb9b1;
  line-height: 1.55;
}

.layout {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 20px;
}

.panel {
  padding: 22px;
  border-radius: 22px;
}

.hidden {
  display: none !important;
}

input {
  width: 100%;
  padding: 13px 14px;
  margin: 7px 0;
  border-radius: 10px;
  border: 1px solid rgba(255, 80, 80, 0.24);
  background: rgba(0, 0, 0, 0.45);
  color: #efe2d8;
  font-size: 15px;
}

button {
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 90, 90, 0.28);
  cursor: pointer;
  color: #160406;
  background: linear-gradient(135deg, #d8b35d, #9e2424);
  font-weight: 800;
}

button:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.actions,
.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.choices button {
  width: 100%;
  text-align: left;
  padding: 14px 16px;
}

.topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 11px;
  margin: 16px 0;
}

.stat {
  min-height: 64px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 80, 80, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 11px;
}

.stat span,
.stat strong {
  white-space: nowrap;
}

.stat strong {
  color: #f0c36a;
  font-size: 18px;
}

.stat.danger strong {
  color: #ff6b6b;
}

.objective-box,
.scene-box,
#mapBox,
#conditionBox {
  background: rgba(70, 0, 0, 0.18);
  border: 1px solid rgba(255, 70, 70, 0.13);
  padding: 16px;
  border-radius: 16px;
  margin-top: 15px;
}

.scene-box {
  min-height: 310px;
}

.scene-location {
  color: #f0c36a;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 13px;
  font-weight: bold;
}

.log {
  height: 320px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(255, 70, 70, 0.12);
  padding: 12px;
  border-radius: 12px;
  font-family: Consolas, monospace;
  color: #e8d7cf;
}

.log p {
  margin: 0 0 8px;
}

.map-button {
  width: 100%;
  margin-bottom: 8px;
  text-align: left;
}

.map-button.active {
  outline: 2px solid #f0c36a;
}

.condition-line {
  margin: 0 0 8px;
}

.good {
  color: #75ffb1;
  font-weight: bold;
}

.warn {
  color: #f0c36a;
  font-weight: bold;
}

.bad {
  color: #ff6b6b;
  font-weight: bold;
}

@media (max-width: 950px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .topline {
    flex-direction: column;
    align-items: stretch;
  }

  button {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}
