/* Carecard: Ruimte style (paper, forest green, Georgia headings). Orange only for warnings. */
:root {
  --paper: #F7F7F0; --ink: #1F2A25; --muted: #5D6B64; --forest: #355E4D; --forest-soft: #E3ECE6;
  --line: #D6DBD2; --card: #FFFFFF; --warn: #B4532A;
  --display: Georgia, "Times New Roman", serif;
  --text: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #161C19; --ink: #E7ECE8; --muted: #9FB0A7; --forest: #8FC2A9; --forest-soft: #22322A; --line: #2E3A34; --card: #1D2521; --warn: #E39470; color-scheme: dark; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--text); font-size: 17px; line-height: 1.5; }
[hidden] { display: none !important; }
.wrap { max-width: 680px; margin: 0 auto; padding: max(20px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 48px max(16px, env(safe-area-inset-left)); display: flex; flex-direction: column; gap: 20px; }
main, section.view { display: flex; flex-direction: column; gap: 14px; }
h1, h2, h3 { font-family: var(--display); font-weight: normal; margin: 0; text-wrap: balance; }
h1 { font-size: 1.7rem; color: var(--forest); }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; color: var(--forest); }
p { margin: 0; }
a { color: var(--forest); }
.muted, .note { color: var(--muted); }
.note { font-size: .9rem; }
.warn { color: var(--warn); font-size: .9rem; }
header { display: flex; flex-direction: column; gap: 6px; }
.top, .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.top, .spread { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.center { align-items: center; }
button { font: inherit; cursor: pointer; border-radius: 6px; border: 1px solid var(--line); background: var(--card); color: var(--ink); padding: 10px 14px; min-height: 44px; }
button:focus-visible, textarea:focus-visible, input:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--forest); outline-offset: 2px; }
button.primary { background: var(--forest); border-color: var(--forest); color: var(--paper); }
button.on { background: var(--forest-soft); border-color: var(--forest); color: var(--forest); font-weight: 600; }
button:disabled { opacity: .5; cursor: not-allowed; }
.lang { display: flex; gap: 4px; }
nav.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
nav.steps button { padding: 8px 4px; font-size: .9rem; }
textarea, input[type=text] { font: inherit; width: 100%; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--ink); padding: 10px; }
label { font-size: .9rem; color: var(--muted); display: block; margin-bottom: 4px; }
summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.box { border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.addr { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; background: var(--forest-soft); color: var(--forest); padding: 2px 6px; border-radius: 4px; overflow-wrap: anywhere; }
.needs { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin-top: 8px; }
.need { text-align: left; display: flex; gap: 10px; align-items: flex-start; }
.pic { font-size: 1.2em; line-height: 1.3; width: 1.5em; flex: none; text-align: center; }
.chat { display: flex; flex-direction: column; gap: 8px; }
.bub { max-width: 85%; padding: 10px 14px; border-radius: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.bub.bot { background: var(--card); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 4px; }
.bub.me { background: var(--forest); color: var(--paper); align-self: flex-end; border-bottom-right-radius: 4px; }
.bub .who { display: block; font-family: var(--display); font-size: .8rem; color: var(--forest); margin-bottom: 2px; }
.opts { display: flex; flex-wrap: wrap; gap: 6px; }
.lines { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.lines li { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.lines li span { min-width: 0; overflow-wrap: anywhere; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.card .headline { font-family: var(--display); font-size: 1.6rem; line-height: 1.25; }
.card.big { font-size: 1.2rem; }
.card.big .headline { font-size: 2.1rem; }
.sec { display: flex; flex-direction: column; gap: 6px; }
.sec ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.sec li { display: flex; gap: 10px; align-items: flex-start; }
.sec.shared { background: var(--forest-soft); border-radius: 8px; padding: 12px; }
.sec.emerg h3 { color: var(--warn); }
.own { font-style: italic; }
.doubt { border-top: 1px solid var(--line); padding-top: 10px; font-size: .92rem; color: var(--muted); }
.doubt summary { color: var(--forest); font-weight: 600; }
.doubt ol { margin: 8px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.foot { font-size: .82rem; color: var(--muted); }
.qr { background: #fff; padding: 12px; border-radius: 6px; }
.qr img { display: block; width: 240px; max-width: 100%; height: auto; image-rendering: pixelated; }
.note-text { white-space: pre-wrap; font-size: 1.15rem; overflow-wrap: anywhere; }
#printArea { display: none; }
@media print {
  body { background: #fff; color: #000; }
  header, main, footer { display: none !important; }
  #printArea { display: flex; flex-direction: column; gap: 12px; }
  #printArea .card { border: 1px solid #000; }
  .doubt summary { display: none; }
}
@media (prefers-reduced-motion: no-preference) { button { transition: background .15s, border-color .15s; } }
.consent { display: flex; gap: 10px; align-items: flex-start; color: var(--ink); font-size: .95rem; }
.consent input { margin-top: 5px; width: 20px; height: 20px; flex: none; }
