:root {
  --bg: #f3efe6;
  --paper: #fffdf8;
  --ink: #1e1a16;
  --muted: #6e655c;
  --line: #e3dacb;
  --green: #1e4d3a;
  --green-soft: #e6f2eb;
  --clay: #8d3d2f;
  --clay-soft: #f8ebe6;
  --amber: #8a5a12;
  --amber-soft: #f8f0dc;
  --shadow: 0 10px 28px rgba(62, 42, 18, 0.07);
  --radius: 18px;
  color-scheme: light;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.4;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 400px at 50% -10%, #efe4cf, transparent 60%),
    var(--bg);
  color: var(--ink);
}

button, input, select, textarea { font: inherit; color: inherit; }

button { cursor: pointer; }

:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
}

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

.top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding-top: calc(0.25rem + env(safe-area-inset-top));
}

.brand {
  margin: 0;
  font-family: "Iowan Old Style", Palatino, Georgia, serif;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}

.tag, .sample-note, .muted, .updated { color: var(--muted); }

.tag { margin: 0.35rem 0 0; }

.sample {
  margin: 0.15rem 0 0;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sample-note { margin: 0.8rem 0 0; font-size: 0.92rem; }

.switch, .tabs {
  display: flex;
  gap: 0.4rem;
  margin: 1rem 0;
}

.tabs { overflow-x: auto; padding-bottom: 0.15rem; }

.switch button, .tabs button, .ghost, .choice {
  min-height: 44px;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
}

.switch button[aria-pressed="true"], .tabs button[aria-pressed="true"], .choice:has(input:checked) {
  background: var(--green);
  border-color: var(--green);
  color: #f7f4ee;
}

.choice { position: relative; display: inline-flex; align-items: center; gap: 0.4rem; }
.choice input { width: 1rem; min-height: 1rem; margin: 0; }

.card, .sheet-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
  margin: 0 0 0.8rem;
}

.card-top, .row, .stepper, .bar-inner, .split {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.card h2, .sheet h2, .subhead {
  font-family: "Iowan Old Style", Palatino, Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.card h2 { margin: 0; font-size: 1.35rem; }

.avail {
  margin: 0;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  color: var(--green);
  font-size: 1.35rem;
  white-space: nowrap;
}

.avail.full {
  color: var(--clay);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.meta, .price, .updated, .note, .warn { margin: 0.35rem 0 0; }

.price { font-weight: 650; }

.warn {
  color: var(--amber);
  background: var(--amber-soft);
  border-radius: 12px;
  padding: 0.55rem 0.7rem;
}

.note {
  color: var(--ink);
  background: #f6f1e6;
  border-radius: 12px;
  padding: 0.55rem 0.7rem;
}

.stepper { justify-content: flex-start; margin-top: 0.8rem; }

.stepper button, .icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 1.3rem;
  line-height: 1;
}

.stepper span {
  min-width: 1.5rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

label { display: block; font-size: 0.92rem; margin: 0.8rem 0 0.3rem; }

input, select, textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 0.65rem 0.75rem;
}

textarea { min-height: 6rem; resize: vertical; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }

.primary, .bar button, .danger {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1rem;
  background: var(--green);
  color: #f7f4ee;
  font-weight: 650;
}

.primary.wide, .danger.wide { width: 100%; }

.danger { background: var(--clay); }

.ghost.danger-text { color: var(--clay); border-color: #efd5ce; }

.stack { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.8rem; }

.bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  background: var(--green);
  color: #f7f4ee;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
}

.bar button { background: #f7f4ee; color: var(--green); }

.has-bar { padding-bottom: 6.5rem; }

.sheet {
  position: fixed;
  inset: 0;
  z-index: 5;
  overflow: auto;
  background: var(--bg);
  padding: 1rem 1rem calc(1.5rem + env(safe-area-inset-bottom));
}

.reference {
  margin: 0.4rem 0;
  font-family: "Iowan Old Style", Palatino, Georgia, serif;
  font-size: 2.4rem;
  letter-spacing: 0.04em;
}

.error {
  background: var(--clay-soft);
  color: var(--clay);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  margin: 0 0 0.8rem;
}

.ok {
  background: var(--green-soft);
  color: var(--green);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  margin: 0.4rem 0 0;
}

.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.5rem; }

.chip {
  min-height: 44px;
  min-width: 44px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0.4rem 0.8rem;
}

.chip[aria-pressed="true"] {
  background: var(--green);
  border-color: var(--green);
  color: #f7f4ee;
}

.hint {
  background: var(--green-soft);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  margin-top: 0.8rem;
}

.status {
  display: inline-block;
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green);
}

.status.out, .tag-out { color: var(--clay); }

.status.wait { color: var(--amber); }

.line { margin: 0.2rem 0; }

.check { display: flex; gap: 0.6rem; align-items: flex-start; margin-top: 0.8rem; }

.check input { width: 1.2rem; min-height: 1.2rem; margin-top: 0.15rem; }

.busy { opacity: 0.72; }

h3 { margin: 1.1rem 0 0.4rem; font-size: 0.95rem; }

.section-title {
  margin: 0.2rem 0 0.15rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  line-height: 1.35;
  text-transform: uppercase;
  color: var(--muted);
}
