:root {
  color-scheme: light;
  --bg: #f7f1e8;
  --panel: rgba(255, 252, 247, 0.92);
  --line: #d9c8b4;
  --text: #1f1a17;
  --muted: #6b5f54;
  --accent: #0d6b57;
  --accent-2: #d7823e;
  --danger: #b24131;
  --shadow: 0 18px 50px rgba(87, 64, 42, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(215, 130, 62, 0.22), transparent 32%),
    radial-gradient(circle at bottom right, rgba(13, 107, 87, 0.18), transparent 28%),
    var(--bg);
}

.shell {
  width: min(1100px, calc(100% - 32px));
  margin: 32px auto;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 20px;
  backdrop-filter: blur(10px);
}

.stack {
  display: grid;
  gap: 14px;
}

.compact {
  gap: 8px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}

.row,
.row-between {
  display: flex;
  gap: 12px;
  align-items: center;
}

.row-between {
  justify-content: space-between;
}

h1,
h2,
p {
  margin: 0;
}

.muted {
  color: var(--muted);
}

.error {
  color: var(--danger);
  min-height: 1.2em;
}

.code {
  font-family: "Courier New", monospace;
  background: #f0e4d5;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px dashed var(--line);
  overflow-wrap: anywhere;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.95rem;
}

input,
textarea,
button,
.button-link {
  font: inherit;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fffdf9;
  color: var(--text);
}

textarea {
  resize: vertical;
}

button,
.button-link {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
  color: white;
  background: linear-gradient(135deg, var(--accent), #0a5343);
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
}

button.secondary {
  background: linear-gradient(135deg, var(--accent-2), #b85c27);
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox input {
  width: auto;
}

.hidden {
  display: none;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 20px, 1100px);
    margin: 20px auto;
  }

  .row,
  .row-between {
    flex-direction: column;
    align-items: stretch;
  }
}
