:root {
  color-scheme: light;
  --bg: #f7f1e7;
  --bg-soft: #efe5d6;
  --panel: #fffdf8;
  --border: #d5c7b6;
  --text: #2f261d;
  --muted: #6c5d4e;
  --accent: #24543e;
  --accent-soft: #e4f0ea;
  --danger: #8f2f2f;
  --danger-soft: #f7e7e7;
  --success: #2f6d43;
  --success-soft: #e7f4ea;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: linear-gradient(180deg, var(--bg-soft), var(--bg));
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.5;
}

.shell {
  max-width: 46rem;
  margin: 0 auto;
  padding: 1rem;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.brand {
  margin: 0;
  font-size: 1.5rem;
}

.brand a {
  color: inherit;
  text-decoration: none;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 0.4rem 1rem rgba(60, 42, 22, 0.06);
}

.stack > * + * {
  margin-top: 0.75rem;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h2 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

form {
  margin: 0;
}

label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

input,
button {
  font: inherit;
}

input[type="password"],
input[type="search"] {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  background: #fff;
}

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

.button,
button {
  display: inline-block;
  min-height: 2.8rem;
  padding: 0.7rem 1rem;
  border-radius: 0.6rem;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
}

.button.secondary,
button.secondary {
  background: #fff;
  color: var(--accent);
}

.button.danger,
button.danger {
  border-color: var(--danger);
  background: #fff;
  color: var(--danger);
}

.flash {
  padding: 0.85rem 1rem;
  border-radius: 0.7rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
}

.flash.success {
  background: var(--success-soft);
  border-color: #bfddc7;
  color: var(--success);
}

.flash.error {
  background: var(--danger-soft);
  border-color: #e4bcbc;
  color: var(--danger);
}

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

.results,
.tracked-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.results li,
.tracked-list li {
  border-top: 1px solid var(--border);
  padding: 0.9rem 0;
}

.results li:first-child,
.tracked-list li:first-child {
  border-top: 0;
  padding-top: 0;
}

.item-title {
  font-size: 1.05rem;
  font-weight: 700;
}

.meta {
  font-size: 0.95rem;
  color: var(--muted);
}

.price-line {
  font-weight: 700;
}

.mini-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.mini-actions form {
  display: inline;
}

@media (max-width: 540px) {
  .shell {
    padding: 0.75rem;
  }

  .header {
    display: block;
  }

  .header form {
    margin-top: 0.75rem;
  }

  .button-row,
  .mini-actions {
    display: block;
  }

  .button-row > *,
  .mini-actions > * {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .button,
  button {
    width: 100%;
    text-align: center;
  }
}