:root {
  --bg: #efe7da;
  --ink: #1c1915;
  --muted: #5e564c;
  --card: #fffdf8;
  --line: #e3d8c8;
  --green: #1e6b45;
  --green-dark: #123c28;
  --amber: #e6a317;
  --amber-ink: #6d4a08;
  --red: #8f2d2d;
  --blue: #1d4e89;
  --shadow: 0 10px 30px rgba(48, 32, 8, 0.08);
  --sans: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  --display: "Iowan Old Style", Palatino, Georgia, serif;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
  background:
    radial-gradient(1200px 400px at 10% -10%, rgba(230, 163, 23, 0.18), transparent 50%),
    var(--bg);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
body.staff { padding-bottom: 84px; }
img { max-width: 100%; }
a { color: var(--green-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; margin: 0 0 0.4rem; }
h1 { font-size: 2rem; line-height: 1.1; }
p { margin: 0 0 0.8rem; }

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 16px;
  background: var(--green-dark);
  color: #f6f1e7;
}
.brand { display: flex; gap: 10px; align-items: center; color: inherit; text-decoration: none; }
.brand img { width: 46px; height: 46px; border-radius: 10px; background: white; object-fit: contain; }
.brand strong { display: block; font-family: var(--display); font-size: 1.15rem; }
.brand small { color: #d7c7a4; }
.top-actions { display: flex; gap: 8px; align-items: center; }
.who { font-size: 0.85rem; color: #d7c7a4; }
.top .btn.ghost { color: #f6f1e7; border-color: rgba(255,255,255,0.3); }
.top .btn.primary { background: var(--amber); color: #2a1c04; }

.wrap { width: min(1080px, calc(100% - 24px)); margin: 18px auto 32px; }
.lede { font-size: 1.05rem; max-width: 40rem; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}
.card h2 { font-size: 1.35rem; }

.flash { padding: 10px 12px; border-radius: 12px; margin: 0 0 12px; }
.flash.ok { background: #e5f4ec; color: #145233; }
.flash.info { background: #eef3f8; color: #1d4e89; }
.flash.warn { background: #fff4d8; color: var(--amber-ink); }
.flash.bad { background: #fdecec; color: var(--red); }

.btn, button.btn, a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--green);
  color: white;
  text-decoration: none;
  cursor: pointer;
  font-weight: 650;
}
.btn.primary { background: var(--green-dark); }
.btn.ghost { background: transparent; color: var(--green-dark); border-color: var(--line); }
.btn.danger { background: transparent; color: var(--red); border-color: #e7c1c1; }
.btn.amber { background: var(--amber); color: #2a1c04; }
.btn.block { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field span, .field-label { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; color: var(--muted); }
input[type="text"], input[type="password"], input[type="email"], input[type="tel"], input[type="number"], input[type="date"], input[type="datetime-local"], select, textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #d9cdb8;
  background: white;
}
textarea { min-height: 88px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(30, 107, 69, 0.25); border-color: var(--green); }

.grid-2 { display: grid; gap: 12px; }
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .span-2 { grid-column: span 2; }
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip, .choice {
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid #d9cdb8;
  background: white;
  padding: 8px 14px;
  cursor: pointer;
}
.chip.on, .choice:has(input:checked), .slot:has(input:checked) {
  background: var(--green-dark);
  color: white;
  border-color: var(--green-dark);
}
.choice { display: flex; align-items: center; gap: 8px; }
.choice input, .slot input { accent-color: var(--green-dark); }

.slots, .service-list { display: flex; flex-wrap: wrap; gap: 8px; }
.slot, .service-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid #d9cdb8;
  background: white;
}
.service-option[hidden] { display: none; }
.price-line { font-family: var(--display); font-size: 1.6rem; margin: 4px 0 8px; }

.callout {
  background: #fff4d8;
  border-radius: 14px;
  padding: 12px;
  color: var(--amber-ink);
}
.rules { display: grid; gap: 8px; }
.rules div { background: #f7f1e6; border-radius: 12px; padding: 10px 12px; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  background: #efe7da;
}
.tag.pass, .tag.in_bay { background: #e5f4ec; color: #145233; }
.tag.fail { background: #fdecec; color: var(--red); }
.tag.pending, .tag.booked { background: #fff4d8; color: var(--amber-ink); }
.tag.bay { background: #e5f4ec; color: #145233; }
.tag.prepay { background: #f3e4ff; color: #5b2a86; }
.tag.na { background: #eee; color: #555; }

.list { display: grid; gap: 10px; }
.job {
  display: grid;
  gap: 4px;
  text-decoration: none;
  color: inherit;
}
.job strong { font-size: 1.15rem; }
.job .meta { color: var(--muted); font-size: 0.92rem; }

.week { display: grid; gap: 12px; }
@media (min-width: 900px) {
  .week { grid-template-columns: 52px repeat(5, 1fr); align-items: start; }
}
.hours { display: none; }
@media (min-width: 900px) {
  .hours { display: block; padding-top: 46px; }
  .hours span { display: block; height: 56px; font-size: 0.75rem; color: var(--muted); }
}
.daycol h3 { font-size: 1rem; margin-bottom: 8px; }
.daycol.today h3 { color: var(--green); }
.rail {
  position: relative;
  background:
    repeating-linear-gradient(to bottom, transparent 0 55px, var(--line) 55px 56px),
    #fffdf8;
  border: 1px solid var(--line);
  border-radius: 12px;
  min-height: 120px;
}
.block {
  position: absolute;
  left: 4px;
  right: 4px;
  overflow: hidden;
  border-radius: 10px;
  padding: 6px 8px;
  background: var(--green-dark);
  color: white;
  text-decoration: none;
  font-size: 0.82rem;
  line-height: 1.25;
}
.block.pending { background: #8a5a00; }
.block.complete { background: #5e564c; }
.block small { display: block; opacity: 0.85; }

.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: flex;
  background: var(--green-dark);
  z-index: 5;
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  flex: 1;
  text-align: center;
  color: #d7c7a4;
  text-decoration: none;
  padding: 12px 4px 14px;
  font-size: 0.82rem;
  font-weight: 700;
}
.tabbar a[aria-current="page"] { color: white; box-shadow: inset 0 -3px 0 var(--amber); }
@media (min-width: 900px) {
  body.staff { padding-bottom: 24px; }
  .tabbar { position: sticky; top: 0; bottom: auto; }
}

.sig { width: 100%; height: 140px; background: white; border: 1px dashed #d9cdb8; border-radius: 12px; touch-action: none; }
.addon { display: grid; grid-template-columns: auto 1fr auto 72px; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.addon input[type="number"] { min-height: 40px; }
.check { display: grid; grid-template-columns: auto 1fr; gap: 8px 10px; align-items: center; padding: 6px 0; }
.check input[type="text"], .check input[type="number"] { grid-column: 2; }
.row-between { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.empty { padding: 18px; text-align: center; color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.svc { margin-bottom: 12px; }
.kv { display: grid; grid-template-columns: 1fr; gap: 2px 12px; margin: 0 0 14px; }
.kv dt { color: var(--muted); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; margin-top: 8px; }
.kv dd { margin: 0; }
@media (min-width: 480px) {
  .kv { grid-template-columns: 140px 1fr; }
  .kv dt { margin-top: 0; }
}
.kv span { color: var(--muted); }
.eyebrow { margin: 0 0 6px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--green); font-size: 0.82rem; }
.shop-block { margin-top: 8px; }
.confirm h1 { margin-bottom: 8px; }
.verify-pass, .verify-fail {
  font-family: var(--display);
  font-size: 2.4rem;
  margin: 0;
}
.verify-pass { color: var(--green); }
.verify-fail { color: var(--red); }
.footer-note { margin-top: 28px; color: var(--muted); font-size: 0.9rem; }
details summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }

@media print {
  .top, .tabbar, .no-print, .flash { display: none !important; }
  body { background: white; }
  .wrap { width: auto; margin: 0; }
  .card { box-shadow: none; border: none; }
}
