:root {
  --cream: #dceef1;
  --paper: #f5fcfc;
  --ink: #163036;
  --muted: #4a6a70;
  --line: #b7d0d3;
  --forest: #1f5c58;
  --forest2: #164743;
  --gold: #d4a04a;
  --thumb: 56px;
  --dock-pad-y: 10px;
  --trust-h: 36px;
  --dock-height: calc(var(--dock-pad-y) + var(--trust-h) + var(--thumb) + var(--dock-pad-y) + env(safe-area-inset-bottom, 0px) + 1px);
  --dock-clearance: calc(var(--dock-height) + 88px);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  background: #cfe4e8;
  color: var(--ink);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: url("/book-img/bg-porch.jpg") center 40% / cover no-repeat;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgba(210, 236, 240, 0.72) 0%,
    rgba(232, 246, 247, 0.82) 42%,
    rgba(186, 220, 224, 0.78) 100%
  );
}
.shell {
  max-width: 560px;
  margin: 0 auto;
  padding: 12px 16px 0;
}
.topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0 12px;
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--cream) 88%, transparent);
  backdrop-filter: blur(8px);
}
.kicker {
  letter-spacing: .14em; text-transform: uppercase;
  font-size: 11px; font-weight: 800; color: var(--gold);
}
.dots { display: flex; gap: 6px; flex: 1; justify-content: center; }
.dots i {
  width: 8px; height: 8px; border-radius: 99px;
  background: #c9c2b4; display: block;
}
.dots i.on { background: var(--forest); width: 18px; }
.lang {
  min-height: 40px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--paper);
  font-weight: 700; cursor: pointer;
}
.hero {
  height: 160px; border-radius: 18px;
  background-size: cover; background-position: center;
  margin-bottom: 16px; box-shadow: 0 10px 28px rgba(36,74,51,.12);
}
.hero.short { height: 110px; }
h1 { font-size: 26px; line-height: 1.2; margin: 0 0 8px; }
.lead { color: var(--muted); margin: 0 0 16px; font-size: 16px; line-height: 1.4; }
.step { display: none; padding-bottom: var(--dock-clearance); }
.step.on { display: block; }
.cats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-bottom: 8px; }
.cat {
  position: relative; min-height: 118px; border: 0; padding: 0;
  border-radius: 16px; overflow: hidden; cursor: pointer;
  text-align: left; color: #fff;
  background: #2a3b30 center/cover no-repeat;
  box-shadow: 0 6px 16px rgba(0,0,0,.12);
}
.cat::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(16,28,20,.78));
}
.cat b, .cat span { position: relative; z-index: 1; display: block; padding: 0 10px; }
.cat b { position: absolute; z-index: 1; left: 0; right: 0; bottom: 28px; font-size: 15px; }
.cat span { position: absolute; z-index: 1; left: 0; right: 0; bottom: 10px; font-size: 11px; opacity: .9; }
.cat.on { outline: 3px solid var(--gold); outline-offset: 2px; }
label { display: block; font-size: 14px; font-weight: 650; margin: 14px 0 6px; }
input, textarea {
  width: 100%; font: inherit; color: inherit;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 14px; min-height: var(--thumb);
}
textarea { min-height: 120px; }
.upload {
  display: flex; align-items: center; justify-content: center;
  min-height: 72px; border: 2px dashed var(--line); border-radius: 16px;
  background: var(--paper); cursor: pointer; font-weight: 700;
}
.upload input { display: none; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.thumbs img { width: 76px; height: 76px; object-fit: cover; border-radius: 12px; }
.slot-card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 16px; padding: 12px; margin-bottom: 10px;
}
.slot-card b { display: block; margin-bottom: 8px; }
.slot-card small { color: var(--muted); font-weight: 500; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.chips button {
  flex: 1; min-width: 96px; min-height: var(--thumb);
  border: 1px solid var(--line); background: #fff; border-radius: 14px;
  font-weight: 700; cursor: pointer;
}
.chips button.on { background: var(--forest); color: #f4efe4; border-color: var(--forest); }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; font-weight: 500; }
.check input { width: 22px; height: 22px; min-height: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pay-amt { font-size: 32px; font-weight: 800; margin: 8px 0 14px; }
.pay-btns { display: flex; flex-direction: column; gap: 10px; }
.paybtn {
  display: flex; align-items: center; justify-content: center;
  min-height: var(--thumb); border-radius: 16px; font-weight: 800;
  text-decoration: none; color: #fff; border: 0; cursor: pointer; font-size: 16px;
}
.paybtn.cash { background: #00C244; }
.paybtn.pal { background: #003087; }
.paybtn.zel { background: #6d1ed4; }
.fine { color: var(--muted); font-size: 13px; line-height: 1.4; }
.trust {
  margin: 0;
  font-size: 11px;
  line-height: 1.35;
  color: var(--muted);
  text-align: center;
  font-weight: 600;
}
.done .trust { margin-top: 18px; padding-bottom: 8px; }
.dock {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 20;
  display: flex; flex-direction: column; gap: 8px;
  padding: var(--dock-pad-y) 16px calc(var(--dock-pad-y) + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, #e8f4f6 92%, #fff);
  border-top: 1px solid var(--line);
  max-width: 560px; margin: 0 auto;
}
.dock-row { display: flex; gap: 8px; }
.btn, .ghost {
  flex: 1; min-height: var(--thumb); border-radius: 16px;
  font-weight: 800; font-size: 16px; cursor: pointer; border: 0;
}
.btn { background: var(--forest); color: #f4efe4; }
.btn:disabled { opacity: .45; }
.ghost { background: transparent; border: 1px solid var(--line); }
.err {
  display: none; margin: 8px 0 var(--dock-clearance); padding: 12px 14px;
  background: #f8e6e2; color: #8a3228; border-radius: 12px;
}
.done { padding-bottom: 24px; }
@media (max-width: 480px) {
  .cats { grid-template-columns: 1fr 1fr; }
  .grid2 { grid-template-columns: 1fr; }
  .step { padding-bottom: calc(var(--dock-clearance) + 12px); }
}
