:root {
  color-scheme: light only;
  --bg: #f6f8f7; --card: #ffffff; --ink: #1f2d2b; --muted: #6b7b78;
  --brand: #2a8c7d; --brand-soft: #e3f2ef; --accent: #f2a65a;
  --line: #e2e8e6; --danger: #c8553d; --ok: #2e9e5b; --radius: 14px;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Almarai", "Tajawal", system-ui, sans-serif; font-size: 16px; line-height: 1.6;
}
.wrap { max-width: 520px; margin: 0 auto; padding: 16px 16px 48px; }
header.hero { text-align: center; padding: 20px 8px 8px; }
.logo {
  width: 64px; height: 64px; margin: 0 auto 8px; border-radius: 50%;
  background: var(--brand); color: #fff; display: grid; place-items: center;
  font-size: 30px; font-weight: 700;
}
h1 { font-size: 22px; margin: 0; }
.sub { color: var(--muted); margin: 2px 0 0; font-size: 15px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin-top: 16px;
}
h2 { font-size: 17px; margin: 0 0 12px; }
.step { color: var(--brand); font-weight: 700; margin-inline-end: 4px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.chip, .slot {
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 10px; padding: 10px 12px; font: inherit; cursor: pointer; white-space: nowrap;
}
.chip small { display: block; color: var(--muted); font-size: 12px; }
.chip.on, .slot.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip.on small { color: #d8efea; }
.chip:disabled, .slot:disabled { opacity: .35; cursor: not-allowed; text-decoration: line-through; }
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hint { color: var(--muted); font-size: 14px; }
label { display: block; font-weight: 600; margin: 12px 0 4px; font-size: 15px; }
input, textarea, select {
  width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; color: var(--ink);
}
input:focus, textarea:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.types { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.type { border: 1px solid var(--line); border-radius: 10px; padding: 10px; text-align: center; cursor: pointer; }
.type input { display: none; }
.type.on { border-color: var(--brand); background: var(--brand-soft); }
.type b { display: block; }
.btn {
  display: block; width: 100%; margin-top: 16px; padding: 13px; border: 0; border-radius: 12px;
  background: var(--brand); color: #fff; font: inherit; font-weight: 700; font-size: 17px;
  cursor: pointer; text-align: center; text-decoration: none;
}
.btn.wa { background: #25d366; }
.btn.ghost { background: transparent; color: var(--brand); border: 1px solid var(--brand); }
.btn:disabled { opacity: .5; }
.err { color: var(--danger); font-size: 14px; margin-top: 8px; min-height: 1em; }
.summary div { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.summary div:last-child { border: 0; }
.done-icon { font-size: 44px; text-align: center; color: var(--ok); }
.addr { font-size: 14px; color: var(--muted); }
.addr a { color: var(--brand); }
.hidden { display: none !important; }
footer { text-align: center; color: var(--muted); font-size: 13px; margin-top: 24px; }
/* admin */
.row { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.bk { border-bottom: 1px solid var(--line); padding: 10px 0; }
.bk:last-child { border: 0; }
.bk .t { font-weight: 700; color: var(--brand); min-width: 70px; }
.bk .actions { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.mini { font: inherit; font-size: 13px; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; color: var(--ink); text-decoration: none; }
.mini.red { color: var(--danger); border-color: #f0c9bf; }
.mini.green { color: #178a47; border-color: #bfe5cf; }
.badge { font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--brand-soft); color: var(--brand); }
.badge.f { background: #fdf0e1; color: #b0672a; }
.free { color: var(--muted); font-size: 14px; }
.logo-img { display: block; width: 180px; max-width: 60%; margin: 0 auto 6px; mix-blend-mode: multiply; }
/* v2 */
.center { text-align: center; }
.doc-hero { position: relative; margin: 8px -16px 0; background: linear-gradient(180deg,#a9cfdc 0%,#cfe4ea 100%); border-radius: 0 0 24px 24px; overflow: hidden; }
.doc-photo { display: block; width: 100%; max-height: 380px; object-fit: cover; object-position: center top; }
.doc-card { position: absolute; left: 12px; right: 12px; bottom: 12px; background: rgba(255,255,255,.93); backdrop-filter: blur(6px); border-radius: 16px; padding: 12px 14px; text-align: center; box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.doc-card h1 { font-size: 22px; color: var(--brand); }
.doc-title { margin: 2px 0 0; font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.5; }
.logo-mini { height: 34px; display: block; margin: 0 auto 2px; mix-blend-mode: multiply; }
.stars-line { margin-top: 4px; color: #e0a100; font-weight: 700; font-size: 14px; }
.btn.small { font-size: 15px; padding: 10px; margin-top: 12px; }
.rev { border-bottom: 1px solid var(--line); padding: 10px 0; }
.rev:last-child { border: 0; }
.rev p { margin: 4px 0; }
.stars { color: #f0a500; letter-spacing: 2px; font-size: 18px; }
.addr-card { margin-top: 18px; padding: 18px 16px; border-radius: 18px; text-align: center; color: #fff;
  background: linear-gradient(135deg, #ff7a59 0%, #f2a65a 100%); box-shadow: 0 8px 22px rgba(242,122,89,.35); }
.addr-icon { font-size: 30px; line-height: 1; }
.addr-label { font-size: 14px; font-weight: 600; opacity: .95; margin-top: 4px; }
.addr-text { font-size: 19px; font-weight: 700; line-height: 1.7; margin: 6px 0 12px; }
.addr-btn { display: inline-block; background: #fff; color: #d65a33; font-weight: 700; padding: 10px 18px; border-radius: 999px; text-decoration: none; }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.stat { background: var(--brand-soft); border-radius: 12px; padding: 10px; text-align: center; }
.stat b { display: block; font-size: 22px; color: var(--brand); }
.stat span { font-size: 13px; color: var(--muted); }
.tabs { display: flex; gap: 6px; margin-top: 12px; }
.tabs button { flex: 1; font: inherit; padding: 9px; border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.tabs button.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.badge.ok { background: #e2f5ea; color: #178a47; }
.badge.no { background: #fbe4df; color: #c8553d; }
.rating-pick { display: flex; justify-content: center; gap: 6px; font-size: 38px; direction: ltr; }
.rating-pick button { background: none; border: 0; font-size: inherit; color: #ccc; cursor: pointer; padding: 0 2px; }
.rating-pick button.on { color: #f0a500; }

/* v3: pointing hero */
.hero-a { position: relative; margin: -16px -16px 0; height: min(133vw, 640px);
  background: #9cc8d4 url(doctor.jpg?v=4) calc(min(1vw, 4px) * -14) top / auto 100% no-repeat; }
.hero-a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 90px;
  background: linear-gradient(transparent, var(--bg)); pointer-events: none; }
.hero-txt { position: absolute; top: 3%; right: 12px; width: 47%; }
.hero-logo { display: block; width: 78%; max-width: 190px; height: auto; margin: 0 0 6px auto; }
.hero-txt h1 { margin: 6px 0 4px; font-size: clamp(21px, 6.1vw, 30px); font-weight: 800; white-space: nowrap; text-align: right; direction: rtl; margin-right: 0; width: max-content; max-width: none; margin-left: auto; color: #0f3d4a; line-height: 1.3; }
.hero-txt p { margin: 0; font-size: clamp(13.5px, 3.8vw, 16px); font-weight: 700; color: #1b5566; line-height: 1.6; }
.hero-txt .stars-line { color: #c98a00; }
.hero-cta { position: absolute; right: 10px; top: 60%; background: #ff6b4a; color: #fff; font-weight: 800;
  font-size: clamp(15px, 4.4vw, 18px); padding: 11px 18px; border-radius: 999px; text-decoration: none;
  box-shadow: 0 8px 20px rgba(255,107,74,.45); }
#bookView { position: relative; z-index: 3; margin-top: -24px; scroll-margin-top: 10px; }
/* v6 vaccines */
.types { grid-template-columns: repeat(3, 1fr); }
.vax { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vx { display: flex; align-items: center; gap: 6px; margin: 0; border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; font-weight: 600; font-size: 14px; cursor: pointer; background: #fff; }
.vx input { width: auto; accent-color: var(--brand); margin: 0; }
.vx.on { border-color: var(--brand); background: var(--brand-soft); }
.badge.v { background: #ece6fb; color: #5b3fb0; }
.vline { font-size: 14px; font-weight: 700; color: #5b3fb0; margin-top: 2px; }
