select {
  width: 20%;
  box-sizing: border-box;
}



body {
  font-family: sans-serif;
  background: #f3f3f3;
  padding: 20px;
}

h1 {
  text-align: center;
  margin-top: 0px;
  margin-bottom: 8px;
}

.panel h2 {
  margin-top: 0px;
  margin-bottom: 6px;
}

.top-bar {
  margin: 20px 0;
  display: flex;
  gap: 20px;
  align-items: center;
}

.game-board {
  display: flex;
  gap: 20px;
}

.panel {
  flex: 1;
  background: white;
  border: 2px solid #ccc;
  border-radius: 10px;
  padding: 15px;
  min-height: 350px;
}

#orders,
#hand {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.order-card {
  border: 2px solid #444;
  border-radius: 8px;
  padding: 10px;
  background: #fff7dd;
  width: 160px;
}

.card {
  width: 70px;
  height: 100px;
  border: 2px solid black;
  border-radius: 10px;
  background: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-size: 24px;
}

.card-name {
  font-size: 10px;
  font-weight: bold;
}

.card-value {
  font-size: 18px;
}

.card-type {
  font-size: 10px;
}

.red {
  color: red;
}

.orange {
  color: orange;
}

.black {
  color: black;
}

.blue {
  color: blue;
}

.green {
  color: green;
}

.status-message {
  margin-top: 20px;
  min-height: 28px;
  font-size: 20px;
  color: darkred;
  font-weight: bold;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

#spells {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.spell-card {
  border: 1px solid #888;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 10px;
  background: #f7f7ff;
}

.spell-card.selected {
  border: 4px solid #999;
}

.spell-card {
  transition: border-width 0.15s;
}

.spell-title {
  font-weight: bold;
}

.spell-desc {
  font-size: 12px;
  color: #666;
  margin-bottom: 6px;
}

.slot-row {
  display: flex;
  gap: 8px;
  margin: 6px 0;
}

.slot {
  width: 50px;
  height: 50px;
  border: 1px dashed #888;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  background: white;
}

.slot.filled {
  border: 1px solid #333;
}

.card.selected {
  opacity: 0.5;
  transform: scale(0.95);
}

.spell-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 220px);
  gap: 10px;
}

.italic {
  font-family: "Georgia", serif;
  font-style: italic;
}