: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; }

.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;
}
label.field { display: block; margin: 12px 0 4px; font-size: 15px; font-weight: 600; }

.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; }

.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; }
.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); }
.spinner { text-align: center; padding: 60px 0; color: var(--muted); }