* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 18px;
  font-family: "Chivo Mono", monospace;
  background: #c4fcff3a;
  color: #111;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 2px solid #111;
  background: #4A6020;
  color: #fff;
  padding: 8px 12px;
  text-transform: uppercase;
  cursor: pointer;
}

button:hover {
  transform: translate(1px, 1px);
}

input,
select,
textarea {
  display: block;
  width: 100%;
  max-width: 420px;
  margin: 6px 0 14px;
  padding: 10px 12px;
  border: 2px solid #111;
  background: #e2d6d6;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

label {
  display: block;
  margin-top: 8px;
  font-size: 0.95rem;
}

.player-tool-page {
  max-width: 1200px;
  margin: 0 auto;
}

.tool-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0;
  font-family: "DM Mono", monospace;
  text-transform: uppercase;
  font-size: 0.8rem;
}

h1 {
  margin: 0;
  font-size: 34px;
  text-transform: uppercase;
}

.primary-action {
  background: #111;
}

.editor-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.panel {
  border: 3px solid #111;
  background: #a147b73a;
}

.panel-header {
  width: 100%;
  background: #f333d079;
  color: #111;
  border: 0;
  border-bottom: 3px solid #111;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  font-style: italic;
  font-size: 1.05rem;
}

.panel:not(.open) .panel-body {
  display: none;
}

.panel-body {
  padding: 18px;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 16px;
}

.field-card {
  border: 2px solid #111;
  background: #a147b746;
  padding: 14px;
}

.field-card h2 {
  margin: 0 0 10px;
  font-size: 1rem;
  text-transform: uppercase;
  font-style: italic;
}

.inline-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.inline-row > div {
  min-width: 140px;
}

.inline-row input {
  margin-bottom: 0;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 8px;
}

.yes-no-row,
.radio-row {
  border: 2px solid #111;
  background: #459a537e;
  padding: 12px;
  margin: 14px 0;
}

.yes-no-row p {
  margin: 0 0 8px;
  font-style: italic;
}

.yes-no-row label,
.radio-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 14px;
}

.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
}

.checkbox-row input {
  width: auto;
  margin: 0;
}

.conditional-field {
  display: none;
}

.entry-list {
  padding-left: 20px;
}

.entry-list li {
  margin: 8px 0;
}

.muted-note {
  max-width: 720px;
  font-style: italic;
  opacity: 0.8;
}

/* =====================================================
   WNBA TIMELINE — preserved from old tool on purpose
   ===================================================== */

.wnba-timeline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.timeline-year-card {
  width: 60px;
  border: 2px solid #111;
  background: #ffffff73;
  color: #000000;
  cursor: pointer;
  text-align: center;
  padding: 6px;
}

.timeline-year-card .year-label {
  font-family: "DM Mono", monospace;
  font-size: 16px;
  margin-bottom: 6px;
  color: #000000;
}

.timeline-year-card .year-square {
  height: 45px;
  width: 45px;
  border: 2px solid #111;
  background: #eee;
}

.timeline-year-card.played .year-square {
  background: #ffcd00;
}

.timeline-year-card.missed .year-square {
  background: #111;
}

.timeline-year-card.selected {
  transform: translate(0px, -3px);
  box-shadow: 1px 1px 0 #111;
}

.season-editor {
  border: 3px solid #111;
  margin-top: 18px;
  background: #a147b746;
  width: fit-content;
  max-width: 100%;
}

.season-editor h3 {
  margin: 0;
  padding: 8px 12px;
  border-bottom: 2px solid #111;
  background: #f333d079;
  font-size: 20px;
  font-style: italic;
  text-transform: uppercase;
}

#selectedSeasonLabel {
  margin: 12px;
  font-style: italic;
}

.season-editor-actions,
.season-entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px;
}

#seasonEntriesList {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 12px;
}

.season-entry-card {
  border: 2px solid #111;
  background: #459a537e;
  padding: 12px;
  width: fit-content;
}

.season-entry-card-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 2px solid #111;
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.season-entry-card textarea {
  width: 320px;
  min-height: 80px;
}

.remove-season-entry-btn,
.remove-image-btn {
  background: red;
}

/* =====================================================
   Debug panel
   ===================================================== */

.debug-panel {
  margin-bottom: 60px;
}

#jsonPreview {
  background: #111;
  color: #f4f0e8;
  padding: 18px;
  border: 2px solid #111;
  overflow-x: auto;
  min-height: 260px;
  max-width: 100%;
  font-size: 0.85rem;
  line-height: 1.5;
}

.player-editing-header {
  border: 3px solid #111;
  background: #f333d079;
  padding: 14px;
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 2fr;
  gap: 18px;
  align-items: end;
}

.editing-label {
  margin: 0 0 4px;
  font-family: "DM Mono", monospace;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.player-editing-header h2 {
  margin: 0;
  font-size: 26px;
  text-transform: uppercase;
  font-style: italic;
}

.summary-id {
  margin: 4px 0 0;
  font-size: 0.9rem;
}

.player-editing-header .summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 8px;
}

@media (max-width: 760px) {
  .tool-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .two-col,
  .summary-grid {
    grid-template-columns: 1fr;
  }
}