/* Two Tree Pie Co: black, white and the oven-tile green. */
:root {
  --ink: #111111;
  --paper: #F5F4EF;
  --card: #FFFFFF;
  --line: #E2E0D8;
  --line-strong: #CFCCC2;
  --muted: #555555;
  --tile: #A6C5B0;      /* brand accent, sampled from the oven tile */
  --amber: #E9A23B;     /* low stock / paused */
  --late: #C62828;      /* order running late, cancel */
  --night: #121211;
  --night-card: #1E1E1C;
  --night-line: #333330;
  --display: 'Zilla Slab', Georgia, serif;
  --body: 'Archivo', system-ui, -apple-system, sans-serif;
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--body); color: var(--ink); background: var(--paper);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: not-allowed; opacity: .4; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; margin: 0; line-height: 1.1; }
a { color: var(--ink); }
:focus-visible { outline: 3px solid var(--tile); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons */
.btn { min-height: 48px; padding: 0 20px; border-radius: 12px; border: 0; font-weight: 700; font-size: 17px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-tile { background: var(--tile); color: var(--ink); }
.btn-ghost { background: var(--card); color: var(--ink); border: 1.5px solid var(--ink); }
.btn-quiet { background: transparent; border: 1px solid var(--line-strong); color: var(--ink); }
.btn-lg { min-height: 62px; font-size: 19px; border-radius: 14px; }
.btn-block { width: 100%; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 6px 11px; border-radius: 999px; white-space: nowrap; }
.pill-tile { background: var(--tile); color: var(--ink); }
.pill-dark { background: var(--ink); color: #fff; }
.pill-gray { background: var(--line); color: #444; }
.pill-amber { background: var(--amber); color: var(--ink); }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: #444; }
.input { height: 48px; border: 1px solid var(--line-strong); border-radius: 12px; padding: 0 14px; font-size: 17px; background: #fff; color: var(--ink); width: 100%; }
.input::placeholder { color: #8A8780; }
.hint { font-size: 13px; font-weight: 500; color: var(--muted); }

/* Segmented control */
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 999px; }
.seg button { min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; font-weight: 700; font-size: 16px; background: transparent; }
.seg button[aria-pressed="true"] { background: var(--tile); color: var(--ink); }

/* Switch */
.switch { width: 60px; height: 44px; padding: 0; border: 0; background: transparent; display: inline-flex; align-items: center; justify-content: center; }
.switch .track { width: 56px; height: 32px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--ink);
  display: flex; align-items: center; padding: 3px; transition: background .15s; }
.switch .knob { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); transition: transform .15s; }
.switch[aria-checked="true"] .track { background: var(--tile); }
.switch[aria-checked="true"] .knob { transform: translateX(24px); }

/* Photo coming soon tile */
.photo-soon { background: var(--tile); color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; text-align: center; font-size: 11px; font-weight: 700; line-height: 1.2; padding: 6px; }
.photo { object-fit: cover; background: var(--line); }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; max-width: min(92vw, 520px);
  background: var(--ink); color: #fff; padding: 14px 20px; border-radius: 14px; font-weight: 600; font-size: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.toast.error { background: #8B1E1E; }

.spinner { width: 44px; height: 44px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--ink); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }
