:root {
	--navy: #112d3f;
	--gold: #b08d57;
	--cream: #f6f1e7;
	--ink: #1d2b36;
	--muted: #5d6b76;
	--line: #e3dccd;
	--ok: #1e5a41;
	--bad: #a63d40;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--cream);
	color: var(--ink);
	font: 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.wrap {
	max-width: 560px;
	margin: 0 auto;
	padding: calc(env(safe-area-inset-top, 0px) + 20px) 18px calc(env(safe-area-inset-bottom, 0px) + 32px);
}

.brand { text-align: center; margin: 0 0 4px; }
.brand img { display: inline-block; height: 56px; width: auto; }

h1 { font-size: 26px; margin: 8px 0 6px; font-weight: 650; letter-spacing: -0.01em; }
h2 { font-size: 19px; margin: 0 0 8px; font-weight: 650; }
h3 { font-size: 16px; margin: 16px 0 6px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); font-size: 15px; }
.center { text-align: center; }
.sp { height: 12px; }

.card {
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 16px;
	padding: 16px;
	margin: 14px 0;
	box-shadow: 0 1px 2px rgba(17, 45, 63, 0.05);
}
.card.accent { border-color: var(--gold); }

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 22px;
	border-radius: 12px;
	border: 0;
	background: var(--navy);
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
.btn.block { width: 100%; }
.btn.ghost { background: transparent; color: var(--navy); border: 1.5px solid var(--navy); }
.btn.danger { background: transparent; color: var(--bad); border: 1.5px solid var(--bad); }
.btn.small { min-height: 40px; padding: 0 14px; font-size: 15px; }
.btn[disabled] { opacity: 0.5; cursor: default; }
a.btn { text-decoration: none; }
.btn.ok { background: var(--ok); }

.input, select, textarea {
	width: 100%;
	min-height: 48px;
	padding: 10px 14px;
	border: 1.5px solid var(--line);
	border-radius: 12px;
	background: #fff;
	font: inherit;
	color: inherit;
}
textarea { min-height: 120px; }
.input.code {
	text-align: center;
	letter-spacing: 0.18em;
	font-size: 24px;
	text-transform: uppercase;
	font-weight: 600;
}
.input.lcode {
	letter-spacing: 0.08em;
	font-size: 20px;
	text-transform: uppercase;
	font-weight: 600;
}
.input.lcode::placeholder { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 17px; }
label.field { display: block; margin: 12px 0 4px; font-size: 15px; font-weight: 600; }
.check { display: flex; gap: 12px; align-items: flex-start; margin: 14px 0; }
.check input { flex: 0 0 24px; width: 24px; height: 24px; margin: 2px 0 0; }
.check label { flex: 1; font-size: 16px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.notice b { font-weight: 700; }

.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 10px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 18px; }
.chip {
	min-height: 44px;
	padding: 0 16px;
	border-radius: 999px;
	border: 1.5px solid var(--navy);
	background: #fff;
	color: var(--navy);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.notice { padding: 12px 14px; border-radius: 12px; background: #e8f2ec; color: var(--ok); margin: 12px 0; }
.notice.err { background: #f8e7e7; color: #8a2f32; }
.notice.warn { background: #f6efdc; color: #6b5420; }

/* The line under the second telephone box: green when the two numbers are the same, red when they are not. */
.hint { margin: 6px 0 0; font-size: 15px; font-weight: 600; }
.hint.ok { color: var(--ok); }
.hint.bad { color: var(--bad); }

/* A note the therapist left for the client (the text keeps the line breaks it was written with). */
.card.note { border: 2px solid var(--gold); background: #fffdf8; }
.notetext { white-space: pre-wrap; }
/* Its first lines, on the client's card in the therapist app. */
.notepv { margin: 6px 0 10px; padding: 6px 10px; font-size: 14.5px; white-space: pre-line; background: #fffdf8; border-left: 3px solid var(--gold); border-radius: 6px; overflow-wrap: anywhere; }
textarea.note { min-height: 140px; }
/* The notes between the two of them: the other side's on the left, one's own on the right; a new one has a gold edge. */
.nt { margin: 10px 24px 10px 0; padding: 10px 12px; border-radius: 12px; background: #f6f1e7; border: 1px solid var(--line); }
.nt.mine { margin: 10px 0 10px 24px; background: #eaf1f5; border-color: #c9d9e3; }
.nt.fresh { background: #fffdf8; border: 2px solid var(--gold); }
.nt .ntwho { margin: 0 0 4px; font-size: 13.5px; color: var(--muted); }
.nt .ntwho .pill { margin-left: 6px; }
.nt .notetext { margin: 0 0 4px; }
.nt .link { padding: 2px 0; font-size: 14px; }
.ntlist { max-height: 38vh; max-height: 38dvh; overflow-y: auto; margin: 0 0 10px; padding-right: 2px; }
.compose { margin-top: 14px; }
.compose textarea { min-height: 100px; }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 6px; border-radius: 999px; background: var(--gold); color: #fff; font-size: 13px; font-weight: 700; line-height: 20px; text-align: center; }

.modal {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background: rgba(17, 45, 63, 0.55);
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding: 16px;
	z-index: 20;
}
.modal .box { background: #fff; border-radius: 18px; padding: 20px; width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; }

.foot { margin-top: 28px; text-align: center; }
.foot a, .link {
	color: var(--navy);
	background: none;
	border: 0;
	font: inherit;
	text-decoration: underline;
	cursor: pointer;
	padding: 4px;
}

.tabs { display: flex; gap: 6px; margin: 6px 0 14px; position: sticky; top: 0; background: var(--cream); padding: 6px 0; z-index: 5; }
.tab { flex: 1; min-height: 44px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; }
.tab.on { background: var(--navy); color: #fff; border-color: var(--navy); }

.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #ece5d6; font-size: 13px; font-weight: 600; margin-right: 6px; }
.pill.ok { background: #dcebe2; color: var(--ok); }
.pill.warn { background: #f3e6c4; color: #6b5420; }

.big { font-size: 28px; font-weight: 700; line-height: 1.2; }
.big-code {
	font-size: 34px;
	letter-spacing: 0.14em;
	font-weight: 700;
	text-align: center;
	padding: 14px;
	background: var(--cream);
	border-radius: 12px;
	margin: 10px 0;
	user-select: all;
}
.day-head { font-weight: 650; margin: 18px 0 4px; text-transform: capitalize; }
.appt { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.appt:first-of-type { border-top: 0; }
/* A held time ("yer tutucu") among the appointments: quiet, no buttons. */
.appt.hold { padding: 5px 0; font-size: 14.5px; color: var(--muted); opacity: 0.85; }
.appt.hold strong { font-weight: 600; }
.hours-row { display: grid; grid-template-columns: 96px 1fr; gap: 8px; align-items: center; margin: 6px 0; }
.small { font-size: 14px; }
.stack + p { margin-top: 16px; }
.steps { padding-left: 1.3em; margin: 10px 0; }
.steps li { margin: 6px 0; }
.phone { padding: 8px 0; border-top: 1px solid var(--line); }
.req { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); }
h3 + .req { border-top: 0; }
.msg { padding: 12px 0; border-top: 1px solid var(--line); }
.grp { font-weight: 650; margin: 16px 0 2px; }
.grp + .msg { border-top: 0; }
.msg .row { margin-top: 8px; }
.msg details { margin-top: 6px; }
.msg pre { white-space: pre-wrap; font: inherit; font-size: 14px; color: var(--muted); margin: 6px 0 0; }
textarea.tpl { min-height: 110px; font-size: 15px; }
.legend { font-size: 13.5px; color: var(--muted); line-height: 1.6; }
.legend code { background: var(--cream); border-radius: 6px; padding: 1px 6px; }
.hide { display: none; }
.guide { list-style: none; margin: 0; padding: 0; }
.gstep { display: flex; gap: 14px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); }
.gstep:first-child { border-top: 0; padding-top: 4px; }
.gstep:last-child { padding-bottom: 4px; }
.gnum { flex: 0 0 36px; height: 36px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.gtext { flex: 1; min-width: 0; font-size: 18px; line-height: 1.35; }
.gtext b { font-weight: 700; }
.gsub { display: block; margin-top: 4px; font-size: 14.5px; line-height: 1.4; color: var(--muted); }
.gicon { flex: 0 0 56px; height: 56px; border-radius: 14px; background: var(--cream); border: 1px solid var(--line); color: var(--navy); display: flex; align-items: center; justify-content: center; }
.gicon svg { display: block; }
.spinner { text-align: center; padding: 60px 0; color: var(--muted); }

/* ---- The client page (body[data-kind="r"]): large, clear and comfortable on every screen. Sizes are in em,
   so the three text sizes the visitor can choose (html.fs0, fs1, fs2) scale everything together. ---- */
body[data-kind="r"] { font-size: 20px; line-height: 1.6; color: #14232d; }
html.fs1 body[data-kind="r"] { font-size: 23px; }
html.fs2 body[data-kind="r"] { font-size: 27px; }
@media (min-width: 900px) {
	body[data-kind="r"] { font-size: 22px; }
	html.fs1 body[data-kind="r"] { font-size: 25px; }
	html.fs2 body[data-kind="r"] { font-size: 29px; }
}
body[data-kind="r"] .wrap, body[data-kind="r"] p, body[data-kind="r"] li, body[data-kind="r"] label, body[data-kind="r"] h1, body[data-kind="r"] h2, body[data-kind="r"] .btn { overflow-wrap: anywhere; word-wrap: break-word; }
body[data-kind="r"] .wrap { max-width: 34em; padding: calc(env(safe-area-inset-top, 0px) + 0.7em) 0.9em calc(env(safe-area-inset-bottom, 0px) + 2em); }
body[data-kind="r"] h1 { font-size: 1.6em; line-height: 1.25; margin: 0.3em 0 0.4em; }
body[data-kind="r"] h2 { font-size: 1.2em; line-height: 1.3; margin: 0 0 0.4em; }
body[data-kind="r"] p { margin: 0 0 0.7em; }
body[data-kind="r"] .muted { font-size: 0.92em; color: #3b4953; }
body[data-kind="r"] .small { font-size: 0.88em; }
body[data-kind="r"] .lead { margin: 0 0 0.8em; }
body[data-kind="r"] .brand { margin: 0 0 0.2em; }
body[data-kind="r"] .brand img { height: 3em; }
body[data-kind="r"] .card { padding: 1em; margin: 1em 0; border-radius: 1em; }
body[data-kind="r"] .notice { padding: 0.8em 1em; border-radius: 0.8em; margin: 0.8em 0; }
body[data-kind="r"] .notice.warn { color: #5a4515; }
body[data-kind="r"] .hint { margin: 0.4em 0 0.7em; font-size: 0.92em; }
body[data-kind="r"] .card.note { border-width: 2px; }
body[data-kind="r"] .notetext { font-size: 1.05em; }
body[data-kind="r"] .nt { margin: 0.7em 0.5em 0.7em 0; padding: 0.6em 0.8em; border-radius: 0.8em; }
body[data-kind="r"] .nt.mine { margin: 0.7em 0 0.7em 0.5em; }
@media (min-width: 700px) {
	body[data-kind="r"] .nt { margin-right: 1.4em; }
	body[data-kind="r"] .nt.mine { margin: 0.7em 0 0.7em 1.4em; }
}
body[data-kind="r"] .nt .ntwho { font-size: 0.8em; }
body[data-kind="r"] .nt .ntwho .pill { margin-left: 0.5em; }
body[data-kind="r"] .nt .link { font-size: 0.85em; min-height: 2.4em; }
body[data-kind="r"] .compose { margin-top: 1em; }
body[data-kind="r"] textarea.input { min-height: 6em; line-height: 1.4; }
body[data-kind="r"] .pill { font-size: 0.8em; padding: 0.15em 0.7em; margin-right: 0.4em; }
body[data-kind="r"] .big { font-size: 1.5em; }
body[data-kind="r"] .row { gap: 0.6em; }
body[data-kind="r"] .stack > * + * { margin-top: 0.8em; }
body[data-kind="r"] .stack + p { margin-top: 1em; }
body[data-kind="r"] .tb.lang { margin-left: auto; }
body[data-kind="r"] .btn { min-height: 3em; padding: 0.5em 1.2em; font-size: 1em; line-height: 1.25; border-radius: 0.75em; text-align: center; }
body[data-kind="r"] .btn.small { min-height: 2.7em; padding: 0.4em 1em; font-size: 0.92em; }
body[data-kind="r"] .btn.xl { min-height: 4em; flex-direction: column; gap: 0.15em; padding: 0.6em 1em; }
body[data-kind="r"] .btn.xl .b1 { font-size: 1.05em; font-weight: 700; }
body[data-kind="r"] .btn.xl .b2 { font-size: 0.78em; font-weight: 400; opacity: 0.92; }
body[data-kind="r"] .input, body[data-kind="r"] select { min-height: 2.9em; padding: 0.4em 0.8em; font-size: 1em; border-width: 2px; border-radius: 0.7em; }
body[data-kind="r"] .input.code { font-size: 1.2em; }
body[data-kind="r"] .input.lcode { font-size: 1.05em; letter-spacing: 0.06em; }
body[data-kind="r"] .input.lcode::placeholder { font-size: 0.9em; }
body[data-kind="r"] label.field { font-size: 1em; margin: 1em 0 0.3em; }
body[data-kind="r"] .check { gap: 0.7em; margin: 1em 0; }
body[data-kind="r"] .check input { flex: 0 0 1.6em; width: 1.6em; height: 1.6em; margin: 0.1em 0 0; }
body[data-kind="r"] .check label { font-size: 1em; }
body[data-kind="r"] .chips { gap: 0.6em; margin: 0.5em 0 1.1em; }
body[data-kind="r"] .chip { min-height: 2.8em; padding: 0 1.1em; font-size: 1em; border-width: 2px; }
body[data-kind="r"] .day-head { font-size: 1.05em; margin: 1.2em 0 0.2em; }
body[data-kind="r"] .link, body[data-kind="r"] .foot a { font-size: 1em; padding: 0.55em 0.4em; min-height: 2.6em; }
body[data-kind="r"] .foot { font-size: 0.92em; margin-top: 1.6em; }
body[data-kind="r"] .gtext { font-size: 1em; }
body[data-kind="r"] .gsub { font-size: 0.85em; }
body[data-kind="r"] :focus-visible { outline: 4px solid #b08d57; outline-offset: 3px; }
body[data-kind="r"] .modal .box { max-width: 30em; max-height: 90vh; max-height: 90dvh; padding: 1.1em 1.1em 0; font-size: 1em; }
/* The answer buttons stay in view whatever the text size: only the text above them scrolls. */
body[data-kind="r"] .modal .box > .stack:last-child { position: sticky; bottom: 0; margin: 0.4em 0 0; padding: 0.7em 0 1.1em; background: #fff; }
@media (min-width: 700px) {
	body[data-kind="r"] .modal { align-items: center; }
}

/* Text size and language, at the top of every screen of the client page. */
body[data-kind="r"] .topbar { display: flex; flex-wrap: wrap; gap: 0.5em; justify-content: space-between; align-items: center; margin: 0 0 0.4em; }
body[data-kind="r"] .sizes { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.35em; }
body[data-kind="r"] .sizes .lbl { font-size: 15px; color: #3b4953; margin-right: 0.2em; }
/* The controls keep one comfortable size whichever text size is chosen (44px is a good touch target). */
body[data-kind="r"] .tb { min-height: 44px; min-width: 44px; padding: 0 12px; font: inherit; font-size: 17px; font-weight: 650; color: var(--navy); background: #fff; border: 2px solid var(--navy); border-radius: 10px; cursor: pointer; }
body[data-kind="r"] .tb.on { background: var(--navy); color: #fff; }
body[data-kind="r"] .step { display: inline-block; margin: 0.2em 0 0.3em; padding: 0.15em 0.8em; font-size: 0.8em; font-weight: 650; color: var(--navy); background: #ece5d6; border-radius: 999px; }

/* A long text that stays closed until the person taps its title (the privacy notice on the registration page). */
body[data-kind="r"] details.more { margin: 1em 0 0.3em; }
body[data-kind="r"] details.more > summary { display: flex; align-items: center; justify-content: space-between; gap: 0.6em; min-height: 3em; padding: 0.4em 1em; list-style: none; cursor: pointer; font-weight: 650; color: var(--navy); background: #fff; border: 2px solid var(--navy); border-radius: 0.75em; }
body[data-kind="r"] details.more > summary::-webkit-details-marker { display: none; }
body[data-kind="r"] details.more > summary::after { content: "+"; flex: 0 0 auto; font-size: 1.5em; line-height: 1; }
body[data-kind="r"] details.more[open] > summary::after { content: "\2212"; }
body[data-kind="r"] details.more > .card { margin: 0.6em 0 0; }

/* Free times grouped by week (the booking horizon can be a few months): the first two weeks are open, the others open with a tap. */
body[data-kind="r"] details.weekbox { margin: 0.6em 0; background: #fff; border: 2px solid var(--line); border-radius: 0.75em; }
body[data-kind="r"] details.weekbox > summary { display: flex; align-items: center; justify-content: space-between; gap: 0.6em; min-height: 3em; padding: 0.4em 1em; list-style: none; cursor: pointer; }
body[data-kind="r"] details.weekbox > summary::-webkit-details-marker { display: none; }
body[data-kind="r"] details.weekbox > summary::after { content: "+"; flex: 0 0 auto; font-size: 1.5em; line-height: 1; color: var(--navy); }
body[data-kind="r"] details.weekbox[open] > summary::after { content: "\2212"; }
body[data-kind="r"] details.weekbox > div { padding: 0 1em; }

/* The "every week" choice next to a request, and the dates of a weekly series on the home screen. */
body[data-kind="r"] .optbox { margin: 1em 0 0.6em; padding: 0.8em 1em; background: #faf6ec; border: 2px solid var(--line); border-radius: 0.75em; }
body[data-kind="r"] .check { display: flex; align-items: flex-start; gap: 0.7em; font-weight: 650; cursor: pointer; }
body[data-kind="r"] .check input { flex: 0 0 auto; width: 1.5em; height: 1.5em; margin: 0.05em 0 0; }
body[data-kind="r"] .optbox p { margin: 0.5em 0 0; }
body[data-kind="r"] details.dates { margin: 0.8em 0; }
body[data-kind="r"] details.dates > summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; font-weight: 650; color: var(--navy); }
body[data-kind="r"] details.dates ul { list-style: none; margin: 0.4em 0 0; padding: 0; }
body[data-kind="r"] details.dates li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.4em 0.8em; padding: 0.55em 0; border-top: 1px solid var(--line); }
body[data-kind="r"] details.dates .acts { display: inline-flex; flex-wrap: wrap; gap: 0.2em 1em; }