.schedule-match-editor {
  min-width: 0;
  padding-bottom: max(20px, var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)));
  overflow-wrap: anywhere;
}

.match-edit-intro {
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.5;
  color: #d0e3da;
}

.match-edit-panel {
  min-width: 0;
  padding: 16px;
  margin-bottom: 16px;
}

.match-edit-panel h2 {
  margin: 0 0 12px;
  font-size: 19px;
  line-height: 1.3;
}

.match-edit-panel label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 700;
}

.match-edit-panel .form-input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 48px;
  min-height: 48px;
  margin: 0 0 10px;
  padding: 10px 32px 10px 12px;
  border: 1px solid #47675a;
  border-radius: 10px;
  background-color: #10271c;
  background-image: linear-gradient(45deg, transparent 50%, #b9cfc3 50%),
    linear-gradient(135deg, #b9cfc3 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  color: #f1f8f4;
  font-size: 16px;
  line-height: 1.3;
  color-scheme: dark;
}

.match-edit-help {
  margin: 8px 0 14px;
  color: #b9cfc3;
  font-size: 13px;
  line-height: 1.5;
}

.match-edit-source-list {
  display: grid;
  gap: 10px;
}

.match-edit-source {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 13px;
  border: 1px solid #47675a;
  border-radius: 12px;
  background: #142e23;
  text-align: left;
  color: #f1f8f4;
}

.match-edit-source.is-selected {
  border-color: #4bd7e9;
  background: #123b37;
}

.match-edit-source-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.match-edit-source-heading strong {
  min-width: 0;
  font-size: 15px;
  line-height: 1.4;
}

.match-edit-badge {
  color: #91e4ed;
  font-size: 11px;
  font-weight: 700;
}

.match-edit-source-slot,
.match-edit-lock-reason {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.5;
  color: #c6dcd0;
}

.match-edit-source:disabled {
  cursor: default;
}

.match-edit-lock-reason,
.match-edit-source:disabled .match-edit-badge {
  color: #ebce97;
}

.match-edit-current strong,
.match-edit-current span {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  line-height: 1.4;
}

.match-edit-current span { color: #c6dcd0; }
.match-edit-error { color: #ffbfb3; line-height: 1.5; }
.match-edit-success { color: #b3ecb4; line-height: 1.5; }
.match-edit-review { border-color: #49938a; }
.match-edit-changes { display: grid; gap: 12px; }

.match-edit-change {
  border: 1px solid #395b4c;
  border-radius: 12px;
  background: #10271c;
  padding: 12px;
}

.match-edit-change h3 {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.4;
}

.match-edit-change dl { margin: 0; }
.match-edit-change dl > div + div { margin-top: 12px; }
.match-edit-change dt { color: #b9cfc3; font-size: 12px; }
.match-edit-change dd { margin: 4px 0 0; font-size: 15px; line-height: 1.4; }
.match-edit-change-next dd { color: #9df0df; font-weight: 700; }
.match-edit-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.match-edit-actions button {
  flex: 1 1 170px;
  min-width: 0;
  min-height: 48px;
  padding: 12px;
  font-size: 14px;
  white-space: normal;
}

.match-edit-actions .match-edit-save {
  border-color: #53bac0;
  background: #1c6b62;
  color: #fff;
  font-weight: 700;
}

.schedule-match-editor button:focus-visible,
.schedule-match-editor select:focus-visible {
  outline: 2px solid #78e8f3;
  outline-offset: 3px;
}

.schedule-match-editor [data-match-edit-refresh] { min-height: 44px; }
.match-edit-actions button:disabled { opacity: .55; }
