/* Terra e Calma — paleta e tipografia aprovadas (Opção A). Sem estilos inline: a CSP não os permite. */
:root {
  --page: #ede6dc; --bg: #f6f1ea; --surface: #fff; --ink: #2b2a26; --muted: #66615a; --line: #ddd3c4;
  --primary: #4f6b57; --tint: #e3ebe4; --warn: #9a4a2e; --warn-bg: #f8e9e2; --danger: #a33b2b;
  --head: Georgia, 'Iowan Old Style', 'Palatino Linotype', serif;
  --body: system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r: 14px; --r-sm: 10px;
}
* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
body { background: var(--bg); color: var(--ink); font-family: var(--body); line-height: 1.45; min-height: 100vh; }
h1, h2, h3 { font-family: var(--head); font-weight: 500; }
h1 { font-size: 1.6rem; font-style: italic; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; margin-top: 8px; }
a { color: var(--primary); }
.wrap { max-width: 640px; margin: 0 auto; padding: 18px 16px 96px; }
.stack { display: grid; gap: 10px; }
.muted { color: var(--muted); font-size: .88rem; }
.center { text-align: center; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; box-shadow: 0 1px 2px rgba(60, 45, 25, .06); }
.card.block { background: repeating-linear-gradient(135deg, var(--surface), var(--surface) 8px, var(--tint) 8px, var(--tint) 16px); }
.slot { display: grid; grid-template-columns: 56px 1fr; gap: 10px; }
.slot time { font-family: var(--head); font-weight: 600; padding-top: 2px; }
.slot b { display: block; }
.badge { display: inline-block; font-size: .75rem; padding: 1px 8px; border-radius: 999px; background: var(--tint); color: var(--primary); margin-left: 6px; }
.badge.warn { background: var(--warn-bg); color: var(--warn); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--primary); border-radius: var(--r-sm); background: var(--primary); color: #fff; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--primary); }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn.small { min-height: 36px; padding: 0 12px; font-size: .88rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.block-btn { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 4px; }
input, select, textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font: inherit; }
textarea { min-height: 96px; resize: vertical; }
input[type='checkbox'] { width: 22px; min-height: 22px; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; color: var(--ink); font-size: .95rem; }
.field + .field { margin-top: 10px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.chip[aria-pressed='true'], .chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip.warn { background: var(--warn-bg); border-color: var(--warn); color: var(--warn); cursor: default; }

.svc { display: flex; justify-content: space-between; align-items: center; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.svc[aria-pressed='true'] { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary) inset; }
.step { font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 10px; }
.msg { padding: 10px 12px; border-radius: var(--r-sm); background: var(--tint); }
.msg.err { background: var(--warn-bg); color: var(--warn); }

/* área privada */
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 6px; max-width: 640px; margin: 0 auto; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; background: var(--surface); border-top: 1px solid var(--line); }
.tabbar a { flex: 1; text-align: center; padding: 14px 4px; min-height: 52px; color: var(--muted); text-decoration: none; font-size: .85rem; }
.tabbar a[aria-current='page'] { color: var(--primary); font-weight: 700; }
.daybar { display: flex; align-items: center; gap: 8px; }
.daybar h2 { flex: 1; text-align: center; text-transform: capitalize; }
.seg { display: flex; gap: 6px; }
.seg button { flex: 1; min-height: 44px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); font: inherit; color: inherit; cursor: pointer; }
.seg button[aria-selected='true'] { background: var(--tint); border-color: var(--primary); color: var(--primary); font-weight: 700; }
.hours-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; margin-top: 6px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

dialog.modal { border: 1px solid var(--line); border-radius: var(--r); padding: 18px; width: min(92vw, 460px); background: var(--bg); color: var(--ink); }
dialog.modal::backdrop { background: rgba(43, 42, 38, .45); }
dialog.modal form { display: grid; gap: 10px; margin-top: 10px; }
.toast { position: fixed; left: 50%; bottom: 76px; transform: translateX(-50%); padding: 10px 16px; border-radius: var(--r-sm); background: var(--ink); color: #fff; z-index: 10; max-width: 90vw; }
.toast.err { background: var(--danger); }
.qr { width: 180px; height: 180px; background: #fff; }

.pre { white-space: pre-wrap; }

/* calendário da marcação pública */
.cal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.cal-title { font-family: var(--head); font-size: 1.1rem; text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { text-align: center; font-size: .78rem; color: var(--muted); padding: 4px 0; }
.cal-day { min-height: 44px; border: 1px solid transparent; border-radius: var(--r-sm); background: transparent; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.cal-day:disabled { color: #9a948a; font-weight: 400; cursor: not-allowed; background: transparent; }
.cal-day:not(:disabled) { background: var(--tint); }
.cal-day.today { border-color: var(--primary); }
.cal-day[aria-pressed='true'] { background: var(--primary); border-color: var(--primary); color: #fff; }
