body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #2b2b2b;
  background: #faf8f3;
}

main {
  max-width: 640px;
  margin: 3rem auto;
  padding: 0 1rem;
}

h1 {
  margin-bottom: 0.25rem;
  color: #3d5a3a;
}

p {
  margin-top: 0;
  color: #6b6b6b;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid #e6e1d6;
}

th {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b6b6b;
}

.price {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.unit-price {
  color: #6b6b6b;
  font-variant-numeric: tabular-nums;
}

#tea-search {
  box-sizing: border-box;
  width: 100%;
  margin: 0 0 1rem;
  padding: 0.5rem 0.75rem;
  font: inherit;
  border: 1px solid #e6e1d6;
  border-radius: 4px;
  background: #fff;
}

.tea-count {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
}

#tea-search:focus {
  outline: 2px solid #3d5a3a;
  outline-offset: -1px;
}

.hide-sold-out {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: #2b2b2b;
  cursor: pointer;
  user-select: none;
}

.hide-sold-out input {
  position: absolute;
  opacity: 0;
}

.switch {
  position: relative;
  width: 2.5rem;
  height: 1.375rem;
  border-radius: 999px;
  background: #d8d2c4;
  transition: background 0.15s ease;
  flex: none;
}

.switch::after {
  content: "";
  position: absolute;
  top: 0.1875rem;
  left: 0.1875rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s ease;
}

.hide-sold-out input:checked + .switch {
  background: #3d5a3a;
}

.hide-sold-out input:checked + .switch::after {
  transform: translateX(1.125rem);
}

.hide-sold-out input:focus-visible + .switch {
  outline: 2px solid #3d5a3a;
  outline-offset: 2px;
}

.stock-label {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  vertical-align: middle;
}

.stock-label.in-stock {
  color: #2c5e2e;
  background: #e4efe0;
}

.stock-label.sold-out {
  color: #8a2f2f;
  background: #f5e2e2;
}

#no-match {
  margin-top: 1rem;
}

.sommelier {
  margin: 0 0 1rem;
}

.sommelier label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
}

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

#sommelier-wish {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0.75rem;
  font: inherit;
  border: 1px solid #e6e1d6;
  border-radius: 4px;
  background: #fff;
}

#sommelier-wish:focus {
  outline: 2px solid #3d5a3a;
  outline-offset: -1px;
}

.sommelier button {
  padding: 0.5rem 1.25rem;
  font: inherit;
  color: #fff;
  background: #3d5a3a;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}

.sommelier button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.powered {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
}

.sommelier-answer {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  background: #eef3ec;
  border-left: 3px solid #3d5a3a;
}

.sommelier-answer p {
  margin: 0;
  color: #2b2b2b;
}

.sommelier-answer .web-note,
.sommelier-answer .sources {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: #6b6b6b;
}

.sommelier-answer .web-note {
  font-style: italic;
}

.sommelier-answer .sources a {
  color: #3d5a3a;
}

.sommelier-answer.error {
  background: #fbf1ec;
  border-left-color: #a5532c;
}

tr.recommended td {
  background: #eef3ec;
  font-weight: 600;
}

footer {
  max-width: 640px;
  margin: 0 auto 3rem;
  padding: 1.5rem 1rem 0;
  border-top: 1px solid #e6e1d6;
}

footer p {
  margin: 0.25rem 0;
  color: #6b6b6b;
}

footer a {
  color: inherit;
}
