.settings-page {
  background:
    radial-gradient(1100px 520px at 50% -10%, rgba(185, 138, 60, 0.14), transparent 70%),
    #14120f;
}

.settings-topbar-status {
  margin: 0 0 0 auto;
  color: #cfc2ab;
  font-size: 0.78rem;
}

.settings-main {
  display: grid;
  align-content: start;
  gap: clamp(0.9rem, 2.5vw, 1.5rem);
  box-sizing: border-box;
  width: min(900px, 100%);
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2rem);
}

.settings-panel {
  display: grid;
  gap: 0.6rem;
  padding: clamp(0.9rem, 2.5vw, 1.4rem);
  border: 1px solid #4a4337;
  border-radius: 14px;
  background: linear-gradient(160deg, #221e18, #191612);
}

.settings-panel h2 {
  margin: 0;
  font-size: 1.05rem;
}

.settings-hint {
  margin: 0;
  color: #cfc2ab;
  font-size: 0.8rem;
  line-height: 1.6;
}

.settings-form,
.settings-row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.6rem 0.9rem;
}

.settings-field {
  display: grid;
  gap: 0.3rem;
}

.settings-field--grow {
  flex: 1 1 14rem;
}

.settings-field__label {
  color: #e7dcc7;
  font-size: 0.8rem;
  font-weight: 600;
}

.settings-field input[type="text"] {
  box-sizing: border-box;
  min-width: 12rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid #6b6252;
  border-radius: 8px;
  background: #221e18;
  color: #efe6d5;
  font: inherit;
}

.settings-field input[type="range"] {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  margin: 0.35rem 0;
  accent-color: #f0c26b;
}

.settings-field input:focus-visible,
.settings-switch:focus-visible {
  outline: 2px solid #f0c26b;
  outline-offset: 2px;
}

.settings-value {
  min-width: 3.2em;
  color: #f0c26b;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.settings-form .match-action,
.settings-row .match-action {
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
}

.settings-switch {
  padding: 0.45rem 0.9rem;
  border: 1px solid #6b6252;
  border-radius: 999px;
  background: #2a241b;
  color: #e7dcc7;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.settings-switch[aria-pressed="true"] {
  border-color: #f0c26b;
  color: #f0c26b;
}

.settings-switch:hover {
  border-color: #c9a25f;
}

.settings-status {
  min-height: 1.2em;
  margin: 0;
  color: #cfc2ab;
  font-size: 0.78rem;
  line-height: 1.5;
}

.settings-options {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.settings-options legend {
  padding: 0;
  margin-bottom: 0.2rem;
}

.settings-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.15rem 0.6rem;
  align-items: center;
  box-sizing: border-box;
  padding: 0.55rem 0.75rem;
  border: 1px solid #4a4337;
  border-radius: 10px;
  background: #221e18;
  cursor: pointer;
}

.settings-option:hover {
  border-color: #c9a25f;
}

.settings-option input {
  grid-row: span 2;
  accent-color: #f0c26b;
}

.settings-option__name {
  color: #e7dcc7;
  font-size: 0.85rem;
  font-weight: 600;
}

.settings-option__hint {
  color: #cfc2ab;
  font-size: 0.76rem;
  line-height: 1.4;
}

.settings-option:has(input:checked) {
  border-color: #f0c26b;
  background: #2a241b;
}

@media (max-width: 640px) {
  .settings-topbar-status {
    margin-left: 0;
  }

  .settings-form {
    align-items: stretch;
  }

  .settings-field input[type="text"] {
    width: 100%;
    min-width: 0;
  }
}
