:root {
  --bg: #f6f2ea;
  --text: #18120b;
  --muted: #5f574e;
  --accent: #007a61;
  --accent-deep: #005f4a;
  --border: #e0d7ca;
  --card: #ffffff;
  --shadow: 0 16px 34px rgba(36, 20, 0, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 18%, #f1d9bd 0%, transparent 39%),
    radial-gradient(circle at 84% 0%, #bfdcd3 0%, transparent 33%),
    var(--bg);
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
}

.settings-shell {
  width: min(900px, 94vw);
  margin: 0 auto;
  padding: 2rem 0 2.5rem;
}

.back-link {
  color: var(--accent-deep);
  text-decoration: none;
  font-size: 0.95rem;
}

.settings-header {
  text-align: center;
  margin: 0.8rem 0 1.2rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.76rem;
  margin: 0;
  color: var(--muted);
}

h1 {
  margin: 0.3rem 0 0.7rem;
  line-height: 1.08;
  font-size: clamp(1.8rem, 4.2vw, 2.8rem);
}

.subtitle {
  margin: 0;
  color: var(--muted);
}

.settings-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 1rem;
}

label,
.section-label {
  display: block;
  margin: 0.3rem 0 0.4rem;
  font-size: 0.95rem;
  font-weight: 600;
}

select,
input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fdfcf8;
  color: #1f1f1f;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.9rem;
  padding: 0.55rem 0.6rem;
}

.inline-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.button-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.65rem;
}

.ghost-btn {
  border-radius: 999px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--border);
  color: var(--text);
  background: #fff;
}

.danger-btn {
  border-color: #d4b0a6;
  color: #8c2c20;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 1rem 0 0.6rem;
}

.options-list {
  margin: 0.5rem 0 0;
  padding-left: 0;
  list-style: none;
  max-height: 320px;
  overflow: auto;
}

.options-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0;
  border-bottom: 1px dashed #e7ddd2;
}

.options-list li:last-child {
  border-bottom: 0;
}

.option-delete-btn {
  border: 1px solid #d9cdc0;
  border-radius: 999px;
  background: #fff;
  color: #8a2f22;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.78rem;
  line-height: 1;
  padding: 0.24rem 0.55rem;
  cursor: pointer;
}

.status-text {
  margin: 0.7rem 0 0;
  min-height: 1.2rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.status-text.error {
  color: #b7322c;
}

.status-text.success {
  color: #166546;
}

@media (max-width: 640px) {
  .inline-row {
    grid-template-columns: 1fr;
  }

  .ghost-btn {
    width: 100%;
  }
}
