:root {
  --paper: #f7f4ee;
  --card: #ffffff;
  --ink: #2f2620;
  --muted: #7d7169;
  --accent: #8b6b4a;
  --accent-soft: #efe6dc;
  --line: #e3dbd1;
  --warn: #b35c00;
  --warn-soft: #fdf0e1;
  --info-soft: #eaf1f8;
  --info: #2f5f8a;
  --error: #b3261e;
  --radius: 16px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: rgba(247, 244, 238, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { font-family: Georgia, "Times New Roman", serif; color: var(--accent); letter-spacing: .1em; font-size: 20px; }
#back { justify-self: start; grid-column: 1; }
.brand { grid-column: 2; }
#lang {
  grid-column: 3;
  justify-self: end;
  font: inherit; font-size: 14px;
  padding: 6px 8px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); color: var(--ink);
}

main { max-width: 720px; margin: 0 auto; padding: 20px 16px 48px; }

h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; margin: 0; }
h1 { font-size: 30px; text-align: center; }
h2 { font-size: 21px; }
.en { color: var(--muted); font-style: italic; }
.center { text-align: center; }
.stack > * + * { margin-top: 16px; }

.hero { text-align: center; margin: 12px 0 24px; }
.hero p { margin: 6px 0 0; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
}

.section-title { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.num {
  flex: none; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: #fff; font-weight: 600; font-size: 15px;
}

.service-list { display: grid; gap: 14px; }
.service {
  display: flex; align-items: center; gap: 16px;
  width: 100%; text-align: left;
  font: inherit; color: inherit;
  background: var(--card); border: 0; border-radius: var(--radius);
  padding: 18px; box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
  cursor: pointer;
}
.service:active { transform: scale(.99); }
.service .icon {
  flex: none; width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; font-size: 26px;
  background: var(--accent-soft);
}
.service .name { font-size: 20px; font-weight: 600; }
.service .chev { margin-left: auto; color: var(--muted); font-size: 24px; }

.field { display: block; }
.field + .field, .field + .choices, .choices + .field { margin-top: 16px; }
.label { display: block; font-size: 15px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.req { color: var(--error); }
input[type=text], input[type=tel], input[type=email], input[type=date], textarea {
  width: 100%;
  font: inherit; font-size: 17px;
  padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px;
  background: #fbfaf7; color: var(--ink);
}
textarea { min-height: 88px; resize: vertical; }
input:focus, textarea:focus, select:focus, button:focus-visible { outline: 3px solid rgba(139, 107, 74, .35); outline-offset: 1px; }

.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.choices.wide { grid-template-columns: 1fr; }
.chip {
  display: flex; gap: 10px; align-items: flex-start;
  width: 100%; text-align: left;
  font: inherit; font-size: 16px; color: inherit;
  padding: 12px 14px; border-radius: 12px;
  background: #f4f1ec; border: 2px solid transparent;
  cursor: pointer;
}
.chip[aria-pressed=true], .chip[aria-checked=true] { background: var(--accent-soft); border-color: var(--accent); }
.box {
  flex: none; width: 22px; height: 22px; margin-top: 1px;
  border: 2px solid #b7aca2; border-radius: 6px;
  display: grid; place-items: center; font-size: 14px; color: #fff;
}
.chip.round .box { border-radius: 50%; }
[aria-pressed=true] .box, [aria-checked=true] .box { background: var(--accent); border-color: var(--accent); }
[aria-pressed=true] .box::after, [aria-checked=true] .box::after { content: "✓"; }

.check-list { display: grid; gap: 8px; }

.consents ul.bullets { margin-bottom: 14px; }
.chip.agree-all { padding: 14px 16px; }
.with-price { display: flex; flex-direction: column; gap: 4px; }
.price { font-weight: 700; color: var(--accent); white-space: nowrap; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }

ul.bullets { margin: 0; padding-left: 20px; }
ul.bullets li + li { margin-top: 8px; }
.group + .group { margin-top: 16px; }
.group h3 { margin: 0 0 8px; font-size: 16px; }

.notice { display: flex; gap: 10px; padding: 14px; border-radius: 12px; background: var(--warn-soft); margin-top: 12px; }
.notice.info { background: var(--info-soft); }
.notice .i { flex: none; }

.sig-wrap { position: relative; border: 2px dashed #c9bdb0; border-radius: 12px; background: #fff; touch-action: none; }
.sig-wrap canvas { display: block; width: 100%; height: 190px; border-radius: 12px; }
.sig-line { position: absolute; left: 20px; right: 20px; bottom: 44px; border-bottom: 1px solid #d8cfc5; pointer-events: none; }
.sig-x { position: absolute; left: 20px; bottom: 48px; color: #b7aca2; pointer-events: none; }
.sig-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size: 14px; color: var(--muted); }

.primary {
  display: block; width: 100%;
  font: inherit; font-size: 19px; font-weight: 600;
  color: #fff; background: var(--accent);
  border: 0; border-radius: 14px;
  padding: 16px; cursor: pointer;
}
.primary[disabled] { opacity: .6; cursor: progress; }
.primary .en { color: rgba(255, 255, 255, .85); font-weight: 400; font-size: 15px; display: block; }
.secondary {
  display: inline-block;
  font: inherit; font-size: 16px; color: var(--accent);
  background: transparent; border: 1.5px solid var(--accent); border-radius: 999px;
  padding: 10px 22px; cursor: pointer;
}
.link-button { font: inherit; font-size: 16px; color: var(--accent); background: none; border: 0; padding: 4px; cursor: pointer; }

.errors { border: 2px solid var(--error); background: #fdecea; }
.errors ul { margin: 8px 0 0; padding-left: 20px; }
.invalid { border-color: var(--error) !important; }

.done { text-align: center; padding: 32px 20px; }
.done .big { font-size: 64px; }

.hidden-honeypot { position: absolute; left: -9999px; }
