:root {
  --sand: #f6f1e1;
  --ink: #1f2a3d;
  --accent: #c68b59;
  --card: #ffffff;
  --border: #d9cbb3;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(180deg, var(--sand), #fdfaf3);
  color: var(--ink);
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

header {
  text-align: center;
  margin-bottom: 16px;
}

h1 {
  margin: 0;
  letter-spacing: 1px;
}

.tagline {
  margin-top: 8px;
  color: #5d6b7a;
}

.game-status {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.status-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.status-card h2 {
  margin-top: 0;
  color: var(--accent);
}

.instructions {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

#decision-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px 16px;
  margin-bottom: 12px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  color: #24354a;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f0e7d8;
  border: 1px solid var(--border);
  font-size: 0.92rem;
  font-weight: 600;
  color: #3a4a5f;
}

input[type="number"] {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
}

button {
  grid-column: 1 / -1;
  padding: 12px 16px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

.helpers {
  margin-top: 4px;
  color: #45556b;
}

.helpers ul {
  margin: 6px 0 0;
  padding-left: 20px;
}

.log {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

#log-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 320px;
  overflow-y: auto;
}

.log-entry {
  background: #f7f1e7;
  border: 1px solid #e3d6c3;
  border-radius: 8px;
  padding: 10px 12px;
  line-height: 1.5;
}

.log-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.9rem;
  color: #9a6c37;
  margin-bottom: 4px;
}

.log-message {
  color: #394456;
}

.note {
  color: #6a7b8e;
  margin-top: 4px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1000;
}

.modal[aria-hidden="false"] {
  display: flex;
}

.modal-content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  text-align: center;
}

.modal-content h3 {
  margin-top: 0;
  color: var(--accent);
}

.modal-content button {
  margin-top: 12px;
}

@media (max-width: 600px) {
  .page {
    padding: 16px;
  }

  button {
    width: 100%;
  }
}
