:root {
  color-scheme: light;
  font-family: Arial, sans-serif;
}

body {
  margin: 0;
  background: #f6f7fb;
}

.container {
  max-width: 1100px;
  margin: 32px auto;
  padding: 0 16px 32px;
}

.card {
  background: #fff;
  border-radius: 10px;
  padding: 18px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.hidden {
  display: none;
}

form {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 5px;
  font-size: 0.95rem;
}

input,
button {
  border-radius: 8px;
  border: 1px solid #ced3e0;
  padding: 10px;
  font-size: 1rem;
}

button {
  background: #1f4fbf;
  border-color: #1f4fbf;
  color: #fff;
  cursor: pointer;
}

button:disabled {
  background: #8e97ad;
  border-color: #8e97ad;
  cursor: not-allowed;
}

button.secondary {
  background: #eff2fa;
  color: #233250;
  border-color: #d7def0;
}

.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.note {
  margin-top: 0;
  color: #5e6b84;
}

.seat-grid {
  --gap-pair: 8px;
  --gap-column: 36px;
  --gap-row: 28px;
  margin: 10px 0 16px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--gap-row);
  overflow-x: auto;
  padding-bottom: 4px;
}

.seat-row {
  display: flex;
  justify-content: center;
  gap: var(--gap-column);
}

.seat-pair {
  display: flex;
  gap: var(--gap-pair);
  flex: 0 0 auto;
}

.seat {
  border: 1px solid #cfd6e8;
  border-radius: 8px;
  width: 104px;
  min-height: 76px;
  text-align: center;
  padding: 8px 6px;
  background: #f9fbff;
  color: #1a2438;
  cursor: pointer;
  flex: 0 0 auto;
}

.seat:disabled {
  background: #f9fbff;
  border-color: #cfd6e8;
  color: #1a2438;
  opacity: 1;
}

@media (max-width: 720px) {
  .seat-grid {
    --gap-pair: 6px;
    --gap-column: 20px;
    --gap-row: 18px;
  }

  .seat {
    width: 84px;
    min-height: 68px;
    font-size: 0.9rem;
  }
}

.seat.occupied,
.seat.occupied:disabled {
  background: #4f5a73;
  border-color: #40495e;
  color: #fff;
  cursor: not-allowed;
}

.seat.selected {
  outline: 3px solid #3b82f6;
  background: #e8f0ff;
  color: #1a2438;
}

.seat-code {
  font-weight: 700;
  display: block;
  margin-bottom: 8px;
  color: inherit;
}

.occupant {
  font-size: 0.8rem;
  color: inherit;
  word-break: break-word;
}

.message {
  min-height: 24px;
  margin: 14px 4px 0;
  color: #1a366b;
}

.message.error {
  color: #b3261e;
}
