:root {
  color-scheme: light;
  --ink: #1e1b16;
  --sand: #f4ecd8;
  --clay: #d99560;
  --ocean: #3a6d7a;
  --forest: #3c5a3c;
  --sun: #f2c46c;
  --stone: #6c6c6c;
  --wheat: #d6b35f;
  --panel: #fff8e9;
  --accent: #b1552f;
  --shadow: rgba(30, 27, 22, 0.15);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", system-ui, sans-serif;
  background: radial-gradient(circle at top, #fff6e6 0%, #efe0c2 45%, #e5d0a7 100%);
  color: var(--ink);
  min-height: 100vh;
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  background: linear-gradient(120deg, rgba(255, 245, 215, 0.95), rgba(255, 231, 186, 0.95));
  box-shadow: 0 8px 24px var(--shadow);
  border-bottom: 1px solid rgba(30, 27, 22, 0.1);
}

.logo {
  font-family: "Cinzel", serif;
  font-size: 26px;
  letter-spacing: 2px;
  font-weight: 600;
}

.badge {
  background: var(--accent);
  color: white;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.container {
  flex: 1;
  padding: 32px;
}

.card {
  background: var(--panel);
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 18px 40px var(--shadow);
  border: 1px solid rgba(30, 27, 22, 0.08);
}

.grid {
  display: grid;
  gap: 24px;
}

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid.three {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.button {
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
  background: var(--accent);
  color: white;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 16px rgba(177, 85, 47, 0.3);
}

.button.secondary {
  background: var(--ocean);
}

.button.ghost {
  background: transparent;
  border: 1px solid rgba(30, 27, 22, 0.2);
  color: var(--ink);
}

.input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(30, 27, 22, 0.2);
  background: white;
  font-size: 14px;
}

.section-title {
  font-family: "Cinzel", serif;
  font-size: 18px;
  margin-bottom: 12px;
}

.lobby-card {
  border: 1px solid rgba(30, 27, 22, 0.08);
  border-radius: 14px;
  padding: 14px;
  background: white;
  display: grid;
  gap: 10px;
}

.player-tag {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(0, 0, 0, 0.08);
}

.board-shell {
  background: radial-gradient(circle at center, #f7efd9 0%, #eddcb8 60%, #e0c89a 100%);
  border-radius: 24px;
  padding: 12px;
  box-shadow: inset 0 0 40px rgba(255, 255, 255, 0.6);
}

.board-svg {
  width: 100%;
  height: 560px;
}

.panel-stack {
  display: grid;
  gap: 16px;
}

.history {
  max-height: 240px;
  overflow: auto;
  font-size: 13px;
}

.action-list {
  display: grid;
  gap: 12px;
}

.action-controls {
  display: grid;
  gap: 8px;
}

.small {
  font-size: 12px;
  opacity: 0.7;
}

@media (max-width: 900px) {
  .container {
    padding: 20px;
  }

  .board-svg {
    height: 420px;
  }
}
