.gopad {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  background: #f9f9f9;
}

.header {
  font-size: 2.5em;
  margin-bottom: 15px;
}

.form-container {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin-bottom: 10px;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fff;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.form-row {
  display: flex;
  width: 100%;
  gap: 16px;
  flex-wrap: nowrap;
}

.form-row-buttons {
  gap: 5px;
  justify-content: flex-end;
  margin-bottom: 5px;
}

.form-row-narrow-gap {
  margin-bottom: 0;
}

.label {
  display: flex;
  align-items: center;
  flex: 1 1 0;
  min-width: 0;
  font-size: 1.1rem;
  font-weight: 500;
  color: #333;
  letter-spacing: 0.01em;
}

.label-game {
  flex: 3 1 0%;
}

.label-date {
  flex: 0.5 1 0%;
  min-width: 100px;
  max-width: 180px;
  margin-left: 12px;
}

.label-black,
.label-white {
  flex: 0.6 1 0%;
}

.label-location {
  flex: 0.7 1 0%;
}

.input {
  margin-left: 8px;
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
  padding: 4px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.95rem;
  height: 2em;
  box-sizing: border-box;
  background: #fafbfc;
  transition: border 0.2s;
}

.input:focus {
  border: 1.5px solid #888;
  outline: none;
  background: #fff;
}

.input-full {
  min-width: 320px;
  max-width: 100%;
}

.input-date-long {
  width: 180px;
  min-width: 140px;
  max-width: 220px;
}

button {
  font-size: 1rem;
  padding: 4px 10px;
}

.goban-img {
  display: block;
  margin: 0 auto 0 auto;
  max-width: 100vw;
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
}

.game-container {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 5px;
}

.right-pane {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100px;
}

.game-history-textarea {
  resize: none;
  font-size: 1rem;
  font-family: monospace;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 5px;
  box-sizing: border-box;
  background: #fff;
  overflow-y: scroll;
  outline: none;
  transition: border 0.2s;
  margin-top: 5px;
}

.handicap-button {
  width: 100%;
  box-sizing: border-box;
}

.handicap-button.toggled {
  background: #d0eaff;
  border: 2px solid #2196f3;
  color: #1565c0;
}

.game-history-textarea:focus {
  border: 1.5px solid #888;
}
