:root {
  --bg: #faf8f6;
  --surface: #ffffff;
  --text: #1f1d1b;
  --muted: #6b655f;
  --line: #e4ded8;
  --accent: #8a2846;
  --accent-ink: #ffffff;
  --ok: #2f6b3f;
  --warn: #8a5a00;
  --err: #a02020;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161413; --surface: #201d1b; --text: #eeeae6; --muted: #a59d95;
    --line: #37322e; --accent: #d9708f; --accent-ink: #1a0d12;
    --ok: #7fc493; --warn: #e2b45c; --err: #ef7d7d;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
a.card { display: block; text-decoration: none; color: var(--text); }
h1 { font-size: 1.6rem; margin: 1.2rem 0 .8rem; }
h2 { font-size: 1.2rem; margin: 1.6rem 0 .6rem; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 16px; }
.brand { font-weight: 700; text-decoration: none; color: var(--text); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.inline { display: inline; margin: 0; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; }
.lang { display: inline-flex; gap: 2px; margin: 0; }
.lang button { background: none; border: 1px solid var(--line); color: var(--muted); font-size: .8rem; padding: 2px 6px; border-radius: 6px; cursor: pointer; }
.lang button[aria-current] { color: var(--text); border-color: var(--text); }
main { padding-bottom: 40px; min-height: 60vh; }
.foot { border-top: 1px solid var(--line); background: var(--surface); font-size: .9rem; color: var(--muted); padding: 14px 0; }
.foot-links { display: flex; flex-wrap: wrap; gap: 16px; }
.traite { color: var(--text); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 12px 0; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.badge { display: inline-block; font-size: .78rem; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--line); }
.badge-ok { color: var(--ok); border-color: var(--ok); }
.badge-warn { color: var(--warn); border-color: var(--warn); }
.badge-err { color: var(--err); border-color: var(--err); }

form p, form > div { margin: 0 0 12px; }
label { display: block; font-weight: 600; margin-bottom: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search],
input:not([type]), select, textarea {
  width: 100%; max-width: 520px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--text); font: inherit;
}
textarea { max-width: 100%; }
input[type=checkbox], input[type=radio] { margin-right: 6px; }
.helptext, .help { display: block; color: var(--muted); font-size: .85rem; font-weight: normal; }
.errorlist { color: var(--err); margin: 4px 0; padding-left: 18px; }
button, .btn { display: inline-block; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 8px;
  padding: 9px 16px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn-ghost { background: none; color: var(--accent); border: 1px solid var(--accent); }
.btn-small { padding: 4px 10px; font-size: .88rem; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.row > * { margin: 0; }

.messages { margin-top: 12px; }
.msg { padding: 10px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); }
.msg-success { border-color: var(--ok); }
.msg-error { border-color: var(--err); }
.msg-info { border-color: var(--warn); }

.gate { max-width: 560px; margin: 8vh auto; text-align: center; }
.gate .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.result { display: flex; flex-direction: column; text-decoration: none; color: var(--text); }
.result:hover h3 { text-decoration: underline; }
.result img, .thumb { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 8px; background: var(--line); }
.result h3 { margin: 8px 0 2px; font-size: 1rem; }
.photos { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.body-text { white-space: pre-line; }

.steps { list-style: none; padding: 0; }
.steps li { padding: 6px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.steps .badge, .steps a, .steps form { flex-shrink: 0; }

.calendar { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.day { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; background: var(--surface); font-size: .88rem; }
.day.active { border-color: var(--ok); }
.day.today { outline: 2px solid var(--accent); }
.day label { font-weight: normal; display: flex; align-items: center; }

table { border-collapse: collapse; width: 100%; background: var(--surface); }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: .92rem; }
.table-wrap { overflow-x: auto; }
.summary-box { border-left: 4px solid var(--accent); }
.danger { border-left: 4px solid var(--err); }
.qr svg { width: 220px; height: 220px; background: #fff; padding: 8px; border-radius: 8px; }
code { font-size: .9rem; word-break: break-all; }
