:root {
  --ivory: #F7F1E8; --ink: #2A2118; --clay: #7C4A3E; --crust: #C4A574;
  --cave: #1C1612; --wine: #3A2420; --field: #E4EADC; --muted: #8A7A68; --moss: #2f3b32;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: Figtree, system-ui, sans-serif; color: var(--ivory);
  background-color: var(--cave);
  background-image: linear-gradient(rgba(18,12,8,.5), rgba(18,12,8,.58)), url("/images/wood.jpg");
  background-size: auto, 320px; background-repeat: repeat;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: Fraunces, Georgia, serif; font-weight: 500; letter-spacing: -.02em; margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
.app { max-width: 430px; margin: 0 auto; min-height: 100vh; min-height: 100svh; background: var(--cave); position: relative; overflow-x: clip; }
input, select, textarea { min-width: 0; max-width: 100%; }
img { max-width: 100%; }
@media (min-width: 520px) {
  body { padding: 28px 0; }
  .app { border-radius: 28px; overflow: hidden; box-shadow: 0 0 0 1px rgba(196,165,116,.14), 0 28px 80px -20px rgba(0,0,0,.55); min-height: auto; }
}
.kicker { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--crust); margin: 0 0 6px; }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  height: 48px; border: 0; border-radius: 999px; background: var(--crust); color: var(--cave);
  font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer;
}
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: transparent; color: var(--crust); box-shadow: inset 0 0 0 1.5px rgba(196,165,116,.35); }
.btn.danger { background: transparent; color: #e8a79a; box-shadow: inset 0 0 0 1.5px rgba(232,167,154,.35); }
.btn.small { height: 38px; font-size: 13px; width: auto; padding: 0 16px; }
.field { margin: 0 0 14px; }
.field label { display: block; font-size: 12px; color: var(--crust); letter-spacing: .04em; margin: 0 0 6px; }
.field input, .field textarea, .field select {
  width: 100%; height: 46px; border-radius: 14px; border: 1px solid rgba(196,165,116,.25);
  background: rgba(247,241,232,.06); color: var(--ivory); padding: 0 14px; outline: none;
}
.field textarea { height: auto; min-height: 96px; padding: 12px 14px; line-height: 1.45; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--crust); }
.field select option { color: var(--ink); }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.card { overflow: hidden; border-radius: 22px; margin-bottom: 14px; background: rgba(247,241,232,.06); }
.card img { width: 100%; height: 180px; object-fit: cover; display: block; }
.card .info { padding: 12px 14px 14px; }
.card .tag { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 4px; color: var(--crust); }
.card h3 { font-size: 1.15rem; line-height: 1.2; }
.card p { margin: 4px 0 0; font-size: 13px; color: rgba(247,241,232,.75); }
.card.arrive { background: var(--field); color: var(--ink); }
.card.arrive .tag, .card.arrive p { color: var(--muted); }
.card.promo { background: var(--wine); }
.old { text-decoration: line-through; opacity: .65; margin-right: 6px; }
.note { font-size: 13px; color: rgba(247,241,232,.6); line-height: 1.5; }
.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(20px);
  background: var(--ivory); color: var(--ink); padding: 12px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 600; opacity: 0; transition: .25s; pointer-events: none; z-index: 50; white-space: nowrap;
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
.sheet-modal { position: fixed; inset: 0; background: rgba(18,12,8,.7); display: none; align-items: flex-end; justify-content: center; z-index: 40; }
.sheet-modal.on { display: flex; }
.sheet-modal .box { width: 100%; max-width: 430px; background: var(--cave); border-radius: 24px 24px 0 0; padding: 20px 18px 28px; max-height: 88vh; max-height: 88svh; overflow: auto; overscroll-behavior: contain; }
.sheet-modal h2 { font-size: 1.4rem; margin-bottom: 14px; }
.tabbar {
  position: sticky; bottom: 0; display: flex; background: rgba(28,22,18,.96); backdrop-filter: blur(10px);
  border-top: 1px solid rgba(196,165,116,.15); padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
}
.tabbar button {
  flex: 1; background: none; border: 0; color: rgba(247,241,232,.5); font-size: 11px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px 0;
}
.tabbar button svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tabbar button.on { color: var(--crust); }
.view[hidden] { display: none; }
.screen { padding: 28px 18px 24px; }
.screen h1 { font-size: 2rem; margin: 4px 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 36px; padding: 0 14px; border-radius: 999px; border: 1.5px solid rgba(196,165,116,.35); background: none; color: var(--ivory); cursor: pointer; }
.chip.on { background: var(--crust); color: var(--cave); border-color: var(--crust); }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(196,165,116,.15); }
.list-item img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item small { display: block; color: rgba(247,241,232,.6); font-size: 13px; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid rgba(196,165,116,.35); background: none; color: var(--crust); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.icon-btn.on { background: var(--clay); border-color: var(--clay); color: var(--ivory); }
.icon-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.icon-btn.on svg { fill: currentColor; }
.stamps { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 8px; }
.dot { width: 30px; height: 30px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(196,165,116,.35); }
.dot.on { background: var(--clay); box-shadow: none; }
.loyalty { padding: 18px; background: var(--clay); border-radius: 18px; }
.loyalty .n { font-family: Fraunces, serif; font-size: 1.8rem; }
.empty { padding: 24px 18px; border-radius: 18px; border: 1px dashed rgba(196,165,116,.35); color: rgba(247,241,232,.7); font-size: 14px; line-height: 1.5; text-align: center; }
.legal { display: flex; flex-wrap: wrap; gap: 10px 16px; justify-content: center; margin: 28px 0 8px; font-size: 12px; }
.legal a { color: var(--crust); text-decoration: none; }
.pause { padding: 40px 24px; text-align: center; }
.pause h1 { font-size: 1.6rem; margin-bottom: 10px; }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }
