#restore-owner-corrections-button {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  border: 1px solid rgba(255, 222, 143, 0.42);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(222, 177, 79, 0.18), rgba(255, 255, 255, 0.035));
  color: #f5cf76;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

#restore-owner-corrections-modal[hidden],
.restore-corrections-editor[hidden],
#restore-correction-bonus-wrap[hidden] {
  display: none !important;
}

#restore-owner-corrections-modal {
  position: fixed;
  z-index: 175;
  inset: 0;
  display: grid;
  place-items: center;
  padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right))
    max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  background: rgba(5, 6, 8, 0.9);
  backdrop-filter: blur(14px);
}

.restore-corrections-dialog {
  width: min(100%, 680px);
  max-height: 100%;
  overflow: auto;
  padding: 20px;
  border: 1px solid rgba(225, 185, 91, 0.28);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), transparent 36%), #111318;
  color: #f7f1e7;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.72);
  color-scheme: dark;
}

.restore-corrections-header {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.restore-corrections-header > span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(224, 183, 86, 0.28);
  border-radius: 15px;
  background: rgba(224, 183, 86, 0.09);
  color: #f5cf76;
  font-size: 22px;
}

.restore-corrections-header h2,
.restore-corrections-header p,
.restore-corrections-editor h3,
.restore-correction-row p,
.restore-correction-row small {
  margin: 0;
}

.restore-corrections-header h2 { font-size: 19px; }
.restore-corrections-header p {
  margin-top: 4px;
  color: #85878d;
  font-size: 11px;
  line-height: 1.45;
}

#restore-corrections-close {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.035);
  color: #aaa9a5;
  font-size: 23px;
  cursor: pointer;
}

.restore-corrections-feedback {
  min-height: 20px;
  margin: 8px 2px;
  font-size: 12px;
  line-height: 1.45;
}

.restore-corrections-feedback:empty { min-height: 0; }
.restore-corrections-feedback.error { color: #ffaaa5; }
.restore-corrections-feedback.success { color: #8ee8b9; }

.restore-corrections-filters,
.restore-corrections-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.restore-corrections-dialog label,
.restore-corrections-editor {
  display: grid;
  gap: 7px;
}

.restore-corrections-dialog label > span,
.restore-corrections-editor legend {
  color: #9a9ca1;
  font-size: 11px;
}

.restore-corrections-dialog input,
.restore-corrections-dialog select,
.restore-corrections-dialog textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 13px;
  background: #0b0d11;
  color: #f4efe6;
  font: inherit;
  box-sizing: border-box;
}

.restore-corrections-dialog textarea {
  min-height: 78px;
  resize: vertical;
}

.restore-corrections-primary,
.restore-corrections-secondary {
  min-height: 48px;
  padding: 11px 14px;
  border-radius: 14px;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.restore-corrections-primary {
  border: 1px solid rgba(225, 185, 91, 0.55);
  background: linear-gradient(135deg, #f4d47f, #d7a941);
  color: #17130d;
}

.restore-corrections-secondary {
  border: 1px solid rgba(225, 185, 91, 0.28);
  background: rgba(225, 185, 91, 0.07);
  color: #f3cf77;
}

.restore-corrections-dialog button:disabled,
.restore-corrections-dialog input:disabled,
.restore-corrections-dialog select:disabled,
.restore-corrections-dialog textarea:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.restore-corrections-status {
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  background: #0b0d11;
  color: #999ba0;
  font-size: 12px;
}

.restore-corrections-status.active {
  border-color: rgba(87, 220, 153, 0.22);
  color: #8ee8b9;
}

.restore-corrections-list {
  display: grid;
  gap: 10px;
}

.restore-correction-row {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 17px;
  background: #15171c;
}

.restore-correction-row.excluded {
  border-color: rgba(255, 164, 157, 0.22);
  opacity: 0.78;
}

.restore-correction-row > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.restore-correction-row > div span {
  color: #8ee8b9;
  font-size: 11px;
}

.restore-correction-row.excluded > div span { color: #ffaaa5; }
.restore-correction-row p { color: #d8d3ca; font-size: 12px; line-height: 1.5; }
.restore-correction-row small { color: #7f8187; font-size: 10px; }

.restore-corrections-editor {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(225, 185, 91, 0.25);
  border-radius: 20px;
  background: rgba(225, 185, 91, 0.035);
}

.restore-corrections-editor h3 { font-size: 17px; }
.restore-corrections-editor fieldset {
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 16px;
}

.restore-correction-counts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 9px;
}

.restore-correction-counts label {
  text-align: center;
}

.restore-correction-counts label > span bdi {
  color: #f4ce74;
  font-size: 16px;
  font-weight: 900;
}

.restore-correction-counts label > span em {
  font-style: normal;
}

.restore-correction-counts input { text-align: center; font-size: 18px; font-weight: 850; }

.restore-correction-check {
  grid-template-columns: 22px minmax(0, 1fr) !important;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(87, 220, 153, 0.2);
  border-radius: 14px;
  background: rgba(87, 220, 153, 0.055);
}

.restore-correction-check.warning {
  border-color: rgba(255, 164, 157, 0.2);
  background: rgba(255, 164, 157, 0.045);
}

.restore-correction-check input {
  width: 20px;
  min-height: 20px;
  margin: 0;
}

.restore-corrections-small {
  margin: -3px 2px 2px;
  color: #85878d;
  font-size: 10px;
  line-height: 1.5;
}

@media (max-width: 560px) {
  .restore-corrections-dialog { padding: 15px; border-radius: 23px; }
  .restore-corrections-filters,
  .restore-correction-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .restore-corrections-actions { grid-template-columns: 1fr; }
}
