:root {
  --bg: #f4f1ea;
  --card: #fffdf8;
  --ink: #1a2330;
  --muted: #3e4651;
  --line: #e3dcd0;
  --green: #1d4a38;
  --green-dark: #143528;
  --cream: #f4f1ea;
  --bad: #8d2f2f;
  --ok: #1d4a38;
  --shadow: 0 0 0 1px var(--line);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { font-size: 18px; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.45;
}
a { color: var(--green); }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.4rem; }
h1 { font-size: 2rem; }
h2 { font-size: 1.35rem; margin-top: 1.4rem; }
p { margin: 0.4rem 0 0.8rem; }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
}
.skip:focus { left: 8px; background: white; padding: 8px; z-index: 5; }

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
  background: var(--green);
  color: white;
}
.brand { color: white; font-weight: 700; text-decoration: none; font-size: 1.15rem; }
.top-links { display: flex; gap: 12px; align-items: center; }
.top a, .top .link { color: white; font-size: 1rem; }
.link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  text-decoration: underline;
  min-height: 44px;
}

main {
  width: min(560px, 100%);
  margin: 0 auto;
  padding: 20px 16px 8px;
}

footer {
  width: min(560px, 100%);
  margin: 0 auto;
  padding: 8px 16px 24px;
  color: var(--muted);
}
body.has-tabs footer {
  padding-bottom: calc(104px + env(safe-area-inset-bottom));
}
footer a { color: var(--muted); }

.lede { font-size: 1.2rem; }
.fine, .muted, small { color: var(--muted); font-size: 0.95rem; }
.safety, .status {
  background: white;
  border-left: 6px solid var(--green);
  padding: 12px 14px;
  border-radius: 12px;
}

.stack { display: grid; gap: 12px; margin: 12px 0 18px; }
.row { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin: 8px 0; }

.btn, button.btn, a.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  margin: 6px 0;
  padding: 12px 16px;
  scroll-margin-bottom: 110px;
  border-radius: 14px;
  border: 2px solid var(--green);
  background: var(--green);
  color: white;
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}
.btn.secondary { background: var(--card); color: var(--green); }
.btn.danger { background: white; color: var(--bad); border-color: var(--bad); }
.btn:active { background: var(--green-dark); color: white; }
.btn.secondary:active, .btn.danger:active { background: var(--green-dark); color: white; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: 3px solid #0b6b4f;
  outline-offset: 2px;
}

.field { display: grid; gap: 6px; font-weight: 650; }
.field i { font-style: normal; font-weight: 500; color: var(--muted); }
.field small { font-weight: 500; }
input, select, textarea {
  width: 100%;
  min-height: 56px;
  padding: 12px 14px;
  border: 2px solid #c9c0b2;
  border-radius: 12px;
  background: white;
  color: var(--ink);
  font: inherit;
}
textarea { min-height: 140px; resize: vertical; }

.choice, .choice-link {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-height: 56px;
  padding: 12px;
  margin: 8px 0;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  font-weight: 650;
}
.choice input { width: 28px; height: 28px; min-height: 28px; margin-top: 2px; }
.choice-link { flex-direction: column; gap: 4px; }
fieldset { border: 0; padding: 0; margin: 8px 0; }
legend { font-weight: 700; margin-bottom: 8px; }

.card, blockquote {
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 16px;
  margin: 12px 0;
}
.card img, .photos img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 10px;
  background: #ddd8ce;
}
.photos { display: grid; gap: 12px; }
.meta, .stars-line { color: var(--muted); }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e7efe9;
  color: var(--green);
  font-size: 0.95rem;
  font-weight: 700;
}
.badge.quiet { background: #ece7dc; color: #3e4651; }

.errors, .flash.bad {
  background: #f8e8e6;
  border-radius: 12px;
  padding: 12px 14px;
  color: #641c1c;
}
.flash.ok { background: #e7efe9; border-radius: 12px; padding: 12px 14px; }
.stars { display: flex; gap: 8px; }
.stars label {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: white;
  font-weight: 700;
}
.stars input { position: absolute; opacity: 0; }
.stars label:has(input:checked) { background: var(--green); color: white; border-color: var(--green); }
.count { margin-top: -6px; }

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  gap: 4px;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  background: white;
  border-top: 1px solid var(--line);
}
.tabbar a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  text-decoration: none;
  color: var(--muted);
  font-weight: 700;
  border-radius: 12px;
}
.tabbar a[aria-current="page"] { background: #e7efe9; color: var(--green); }
ul.plain { padding-left: 1.1rem; }
ul.plain li { margin: 0.45rem 0; }
blockquote footer { color: var(--muted); }
