:root {
  color-scheme: light;
  --bg: #183428;
  --panel: rgba(244, 248, 242, 0.9);
  --panel-strong: #f8fcf5;
  --text: #112019;
  --muted: #466052;
  --line: rgba(17, 32, 25, 0.12);
  --accent: #2f6b52;
  --accent-strong: #1d4f3b;
  --accent-soft: rgba(47, 107, 82, 0.12);
  --success: #2f6b52;
  --warn: #7d6330;
  --danger: #a1362a;
  --shadow: 0 20px 60px rgba(77, 47, 30, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Georgia", "Times New Roman", serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(91, 160, 123, 0.24), transparent 26%),
    radial-gradient(circle at 85% 10%, rgba(24, 52, 40, 0.38), transparent 24%),
    linear-gradient(180deg, #dceadf 0%, var(--bg) 100%);
}

.shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

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

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  margin-bottom: 18px;
}

.hero-actions {
  display: grid;
  gap: 12px;
  align-content: start;
}

.auth-box {
  display: grid;
  gap: 8px;
}

.auth-line {
  margin: 0;
}

.auth-line[data-tone="success"] {
  color: var(--accent-strong);
}

.auth-line[data-tone="danger"] {
  color: var(--danger);
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.version-switcher {
  display: grid;
  gap: 6px;
}

.version-switcher-label {
  padding-left: 4px;
}

.version-switcher select {
  min-width: 150px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
  font: inherit;
}

.eyebrow,
.label,
.tiny {
  margin: 0;
}

.eyebrow,
.label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-strong);
}

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

h1 {
  margin-bottom: 12px;
  font-size: clamp(2.4rem, 7vw, 5rem);
  line-height: 0.95;
}

h2 {
  margin-bottom: 0;
  font-size: 1.5rem;
}

.intro,
.tiny,
.meta,
.resource-line,
.special-note {
  color: var(--muted);
}

.objective-copy {
  max-width: 36rem;
}

.ghost-link,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}

.ghost-link {
  height: fit-content;
  padding: 12px 16px;
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.46);
}

.button {
  border: 0;
  padding: 11px 15px;
  background: var(--accent);
  color: #fff9f4;
  cursor: pointer;
}

.button:hover,
.button:focus-visible,
.ghost-link:hover,
.ghost-link:focus-visible {
  outline: none;
  background: var(--accent-strong);
  color: #fff9f4;
}

.button.alt {
  background: #2f6452;
}

.button[disabled] {
  cursor: not-allowed;
  opacity: 0.45;
}

.status-grid,
.board {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.status-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.status-grid .panel {
  padding: 18px 20px;
}

.big-value {
  margin: 8px 0 0;
  font-size: clamp(1.5rem, 4vw, 2.8rem);
  line-height: 1;
}

.board {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
}

.board.single {
  grid-template-columns: minmax(0, 1fr);
}

.board .panel {
  padding: 22px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin-bottom: 16px;
}

.stack {
  display: grid;
  gap: 14px;
}

.card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel-strong);
}

.card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.release-panel {
  padding: 22px;
}

.release-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.release-changes {
  padding-left: 20px;
}

.campaign-badge.ongoing {
  background: rgba(45, 117, 88, 0.14);
  color: var(--success);
}

.campaign-badge.victory {
  background: rgba(181, 77, 45, 0.16);
  color: var(--accent-strong);
}

.campaign-badge.defeat {
  background: rgba(161, 54, 42, 0.14);
  color: var(--danger);
}

.stats,
.costs,
.actions,
.special-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: #f5eee2;
  color: var(--text);
  font-size: 0.88rem;
}

.costs {
  margin: 10px 0 0;
}

.actions {
  margin-top: 14px;
}

.hero-row {
  display: grid;
  gap: 10px;
}

.toggle {
  display: grid;
  gap: 10px;
}

.toggle input {
  margin-right: 8px;
}

.quest-result {
  display: grid;
  gap: 8px;
}

.quest-result strong.success {
  color: var(--success);
}

.quest-result strong.failure {
  color: var(--danger);
}

.campaign-panel {
  position: relative;
  overflow: hidden;
}

.campaign-panel::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -50px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 107, 82, 0.18), transparent 65%);
  pointer-events: none;
}

.resolution {
  min-height: 180px;
  padding: 18px;
  border-radius: 20px;
  background: #fffaf3;
  border: 1px solid var(--line);
}

.resolution.empty {
  display: grid;
  place-items: center;
  color: var(--muted);
}

.log {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 10px;
}

.log li {
  color: var(--muted);
}

@media (max-width: 860px) {
  .hero,
  .section-head {
    flex-direction: column;
  }

  .status-grid,
  .board {
    grid-template-columns: 1fr;
  }
}
