:root {
  --bg: #efeae2;
  --card: #fffdf9;
  --ink: #1d1a16;
  --muted: #6b6258;
  --line: #e3d9cc;
  --green: #1c6b45;
  --green-dark: #134a30;
  --warn: #8c3a22;
  --warn-bg: #f8ebe3;
  --ok-bg: #e7f3ec;
  --shadow: 0 1px 0 rgba(29, 26, 22, 0.04);
  --sans: "Avenir Next", "Segoe UI", sans-serif;
  --serif: "Iowan Old Style", Palatino, Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.45 var(--sans);
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }

.boot { padding: 24px; }

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 10px;
  background: rgba(239, 234, 226, 0.94);
  border-bottom: 1px solid transparent;
}
.brand {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.brand span { color: var(--green); }
.credit {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.01em;
}
.who {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px 0;
}

.screen {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 8px 16px 108px;
}
h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 32px;
  line-height: 1.1;
  margin: 8px 0 6px;
}
h2 {
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 22px 0 8px;
}
p { margin: 0 0 10px; }
.lead { color: var(--muted); margin-bottom: 16px; }

.card, .sheet {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  margin: 10px 0;
  box-shadow: var(--shadow);
}
.card h3, .sheet h3 {
  margin: 0 0 4px;
  font-size: 18px;
}
.tight { border-color: #e2b2a4; background: var(--warn-bg); }
.ok { background: var(--ok-bg); border-color: #b7d7c4; }

.row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}
.muted { color: var(--muted); }
.time {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}
.warn { color: var(--warn); }

.field { display: block; margin: 0 0 12px; }
.field span, .check span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 14px;
}
input, select, textarea {
  width: 100%;
  background: white;
  border: 1px solid #d9cec0;
  border-radius: 12px;
  padding: 12px;
  font-size: 16px;
}
textarea { min-height: 88px; resize: vertical; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.primary, .secondary, .ghost, .danger {
  min-height: 48px;
  border-radius: 12px;
  padding: 10px 14px;
}
.primary {
  width: 100%;
  border: 0;
  background: var(--green);
  color: white;
  font-weight: 650;
}
.secondary, .ghost {
  background: white;
  border: 1px solid #d9cec0;
}
.danger {
  background: transparent;
  border: 0;
  color: var(--warn);
  padding-left: 0;
}
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.actions a, .actions button { text-decoration: none; }

.nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  background: var(--card);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 6;
}
.nav button {
  flex: 1;
  min-height: 56px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}
.nav button.on { color: var(--green-dark); font-weight: 700; }

.banner {
  border-radius: 12px;
  padding: 10px 12px;
  margin: 8px 0;
}
.banner.bad { background: var(--warn-bg); color: var(--warn); }
.banner.good { background: var(--ok-bg); }

.pill {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 8px;
  background: #efe6da;
  font-size: 13px;
}
.map-wrap { height: 380px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
#map { height: 100%; width: 100%; background: #ddd4c8; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.photos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.photos figure { margin: 0; }
.photos img { border-radius: 12px; height: 120px; width: 100%; object-fit: cover; background: #eee; }
.sheet table { width: 100%; border-collapse: collapse; font-size: 14px; }
.sheet td { padding: 4px 0; vertical-align: top; }
.sheet td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rule { border-top: 1px solid var(--line); margin: 8px 0; }
.check { display: flex; gap: 10px; align-items: center; margin: 12px 0; }
.check input { width: 22px; height: 22px; }
.bubble {
  width: 68px;
  height: 68px;
  border: 0;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 13px;
  box-shadow: 0 8px 20px rgba(28, 107, 69, 0.28);
}
.drawer-back {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(29, 26, 22, 0.38);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.drawer {
  width: min(560px, 100%);
  max-height: 86vh;
  overflow: auto;
  background: var(--card);
  border-radius: 18px 18px 0 0;
  padding: 16px 16px 28px;
}
.status-done { color: var(--green); font-weight: 600; }
.status-open { color: var(--muted); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

@media print {
  body * { visibility: hidden; }
  .sheet, .sheet * { visibility: visible; }
  .sheet {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    border: 0;
    box-shadow: none;
  }
  .noprint { display: none !important; }
}
