:root {
  --brand: #007F82;
  --brand-dark: #00696c;
  --brand-soft: #e6f4f4;
  --accent: #0ea5a8;
  --bg: #f4f8f8;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #5b6b7a;
  --border: rgba(15, 23, 42, 0.10);
  --danger: #dc2626;
  --danger-bg: #fee2e2;
  --success: #059669;
  --success-bg: #d1fae5;
  --warn: #b45309;
  --warn-bg: #fef3c7;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(15,23,42,.06), 0 8px 24px rgba(15,23,42,.06);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Roboto Condensed", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #f3f6f6;
  color: var(--text);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
.app { min-height: 100vh; padding-bottom: env(safe-area-inset-bottom, 16px); }
.topbar {
  position: sticky; top: 0; z-index: 20;
  padding: 10px 14px 12px;
  background: #ffffff;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
}
.topbar-main { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.topbar-status {
  display:flex; align-items:center; flex-wrap:wrap; gap:6px;
  margin-top:10px; padding:6px 10px;
  background:#f5f8f8; border-radius:10px;
  font-size:11px; color:var(--muted);
}
.brand { display:flex; align-items:center; gap:10px; min-width:0; cursor:pointer; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px; overflow: hidden; background: #e7f6f3;
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto; border: none; box-shadow: none;
}
.brand-mark img { width: 30px; height: 30px; object-fit: contain; display: block; background: transparent; }
.brand-text { min-width:0; display:flex; flex-direction:column; gap:2px; }
.brand-title { font-size:17px; font-weight:700; line-height:1.1; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.brand-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn {
  border:1px solid rgba(0,127,130,.18); background:#fff; color:var(--brand-dark);
  border-radius:999px; padding:6px 12px; font-size:12px; font-weight:600; cursor:pointer;
  display:inline-flex; align-items:center; gap:6px; text-decoration:none; white-space:nowrap;
}
.quick-nav { position: fixed; bottom: 0; z-index: 40; max-width: 440px; left: 50%; transform: translateX(-50%); width: 100%; box-sizing: border-box;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
  padding: 8px 12px 0;
}
.qnav {
  border: 1px solid var(--border); background: #fff; color: var(--muted);
  border-radius: 999px; padding: 8px 6px; font-size: 12px; font-weight: 600; cursor: pointer;
}
.qnav.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.screen { overflow-x: hidden; padding: 12px 12px 24px; max-width: 760px; margin: 0 auto; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; box-shadow: var(--shadow); margin-bottom: 12px;
}
.card.flat { box-shadow: none; }
.card.center { text-align: center; }
.hero {
  background: linear-gradient(135deg, #007F82 0%, #0ea5a8 100%);
  color: #fff; border: none; overflow: hidden; position: relative;
}
.hero h1 { margin: 0 0 6px; font-size: 22px; line-height: 1.15; }
.hero p { margin: 0; color: rgba(255,255,255,.92); font-size: 14px; }
.hero-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; margin-top: 12px; }
.hero-stat { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.18); border-radius: 12px; padding: 10px; }
.hero-stat .v { font-size: 18px; font-weight: 700; line-height: 1.1; }
.hero-stat .l { font-size: 12px; color: rgba(255,255,255,.9); margin-top: 2px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.hero-badge { background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.22); color: #fff; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
h2 { font-size: 18px; margin: 0 0 8px; }
h3 { font-size: 15px; margin: 0 0 6px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.row { display: flex; gap: 8px; align-items: center; }
.row.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grid { display: grid; gap: 10px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.stack { display: grid; gap: 8px; }
.divider { height: 1px; background: var(--border); margin: 10px 0; }
.btn, button.btn {
  appearance: none; border: none; border-radius: 12px; padding: 12px 14px;
  background: var(--brand); color: #fff; font-size: 15px; font-weight: 700; cursor: pointer;
  width: 100%; text-align: center;
}
.btn:hover { background: var(--brand-dark); }
.btn.secondary { background: #fff; color: var(--brand-dark); border: 1px solid rgba(0,127,130,.25); }
.btn.ghost { background: var(--brand-soft); color: var(--brand-dark); }
.btn.danger { background: #fff; color: var(--danger); border: 1px solid rgba(220,38,38,.25); }
.btn.danger.solid { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn.sm { padding: 8px 10px; font-size: 13px; border-radius: 10px; width: auto; }
.req { color: var(--danger); font-weight: 700; }
.profile-edit-btn { border:1px solid var(--border); background:#fff; color:var(--brand-dark); border-radius:10px; padding:6px 10px; font-size:12px; font-weight:700; cursor:pointer; }
.profile-edit-btn:hover { background: var(--brand-soft); }
.profile-actions { display:flex; gap:8px; align-items:center; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--border); background: #fff; color: var(--text);
  border-radius: 999px; padding: 8px 12px; font-size: 13px; cursor: pointer; user-select: none;
}
.chip.selected { background: var(--brand-soft); color: var(--brand-dark); border-color: rgba(0,127,130,.35); font-weight: 600; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #eef2f7; color: #334155; }
.pill.brand { background: var(--brand-soft); color: var(--brand-dark); }
.pill.ok { background: var(--success-bg); color: var(--success); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.danger { background: var(--danger-bg); color: var(--danger); }
.field { margin-bottom: 10px; }
.label { font-size: 13px; color: var(--muted); margin-bottom: 4px; font-weight: 600; }
.input, .textarea, select.input {
  width: 100%; border: 1px solid var(--border); border-radius: 12px; padding: 11px 12px;
  font-size: 15px; color: var(--text); background: #fff; font-family: inherit;
}
.textarea { min-height: 96px; resize: vertical; }
.input:focus, .textarea:focus { outline: 2px solid rgba(0,127,130,.18); border-color: rgba(0,127,130,.35); }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.list { display: grid; gap: 8px; }
.item {
  border: 1px solid var(--border); border-radius: 14px; padding: 12px; background: #fff; cursor: pointer;
}
.item.selected { border-color: rgba(0,127,130,.45); background: #f3fbfb; }
.item .title { font-weight: 700; font-size: 15px; }
.item .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.item .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.doctor-card { display: grid; grid-template-columns: 44px 1fr; gap: 10px; align-items: start; }
.avatar { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-dark); display: grid; place-items: center; font-weight: 700; }
.slot-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.slot {
  position: relative; border: 1px solid var(--border); border-radius: 12px; padding: 10px; background: #fff; cursor: pointer;
}
.slot-card { position: relative; }
.slot.selected { border-color: rgba(0,127,130,.5); background: #f3fbfb; }
.slot .t { font-weight: 700; font-size: 15px; }
.slot .d { font-size: 12px; color: var(--muted); margin-top: 2px; }
.slot .tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.banner { border-radius: 14px; padding: 12px; border: 1px solid var(--border); }
.banner.info { background: #f0f9ff; border-color: #bae6fd; color: #075985; }
.banner.warn { background: var(--warn-bg); border-color: #fcd34d; color: #92400e; }
.banner.danger { background: var(--danger-bg); border-color: #fecaca; color: #991b1b; }
.banner.ok { background: var(--success-bg); border-color: #a7f3d0; color: #065f46; }
.hold-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; border-radius: 12px; background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412;
  font-weight: 600; margin-bottom: 10px;
}
.timer { font-variant-numeric: tabular-nums; font-weight: 700; }
.section-title { display:flex; align-items:center; justify-content:space-between; gap:8px; margin: 2px 0 8px; }
.section-title h2, .section-title h3 { margin: 0; }
.fdi-wrap { border: 1px solid var(--border); border-radius: 14px; padding: 10px; background: #fafdfd; }
.fdi-arch { margin-bottom: 8px; }
.fdi-arch:last-child { margin-bottom: 0; }
.fdi-label { font-size: 12px; color: var(--muted); margin-bottom: 4px; font-weight: 600; }
.fdi-row { display: grid; grid-template-columns: repeat(8, minmax(0,1fr)); gap: 4px; }
.tooth {
  border: 1px solid #cfe3e3; background: #fff; color: #134e4a; border-radius: 8px;
  padding: 8px 0; font-size: 12px; font-weight: 700; text-align: center; cursor: pointer;
}
.tooth.selected { background: var(--brand); color: #fff; border-color: var(--brand); }
.range-row { display: flex; align-items: center; gap: 10px; }
.range-row input[type=range] { flex: 1; accent-color: var(--brand); }
.range-val { min-width: 34px; text-align: center; font-weight: 700; color: var(--brand-dark); }
.checkline { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; }
.checkline input { margin-top: 3px; accent-color: var(--brand); }
.ticket { border: 1px dashed rgba(0,127,130,.35); border-radius: 14px; padding: 12px; background: #f7fbfb; }
.ticket-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid rgba(15,23,42,.06); }
.ticket-row:last-child { border-bottom: none; }
.ticket-row .k { color: var(--muted); font-size: 13px; }
.ticket-row .v { font-weight: 600; text-align: right; font-size: 14px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kv .box { background: #f8fafc; border: 1px solid var(--border); border-radius: 12px; padding: 10px; }
.kv .k { font-size: 12px; color: var(--muted); }
.kv .v { font-size: 14px; font-weight: 700; margin-top: 2px; }
.empty { text-align: center; color: var(--muted); padding: 18px 8px; }
.spinner {
  width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(0,127,130,.18);
  border-top-color: var(--brand); margin: 4px auto 8px; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.toast {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%);
  background: #0f172a; color: #fff; padding: 10px 14px; border-radius: 999px;
  font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.2); z-index: 50; max-width: calc(100% - 24px);
}
.hidden { display: none !important; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mb8 { margin-bottom: 8px; }
.actions { display: grid; gap: 8px; margin-top: 10px; }
.actions.cols-2 { grid-template-columns: 1fr 1fr; }
.link-btn { background: none; border: none; color: var(--brand-dark); font-weight: 600; padding: 0; cursor: pointer; }
small.err { color: var(--danger); font-size: 12px; }
hr.sep { border: none; border-top: 1px solid var(--border); margin: 10px 0; }
@media (min-width: 520px) {
  .hero-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .slot-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}

/* Clinic Smile mobile refresh */
:root {
  --brand: #078b87;
  --brand-dark: #076d6d;
  --brand-soft: #e7f6f3;
  --accent: #24b49d;
  --bg: #f4f7f8;
  --text: #172b31;
  --muted: #73848a;
  --border: #e8eef0;
  --radius: 22px;
  --shadow: 0 10px 30px rgba(22, 52, 61, .065);
}
* { -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  background: #f3f6f6;
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -.01em;
}
.app { min-height: 100dvh; padding-bottom: calc(102px + env(safe-area-inset-bottom, 0px)); max-width: 440px; margin: 0 auto; width: 100%; position: relative; }
.topbar {
  position: relative; top: auto; z-index: 10;
  padding: 14px 16px 12px;
  max-width: 440px; margin: 0 auto;
  background: #ffffff; border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
  border-radius: 0;
}
.brand { gap: 11px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px; overflow:hidden;
  background: #e7f6f3; box-shadow: none; border: none;
  display:flex; align-items:center; justify-content:center;
  font-size: 13px; letter-spacing: -.04em;
}
.brand-title { font-size: 16px; font-weight: 800; letter-spacing: -.04em; }
.brand-sub { font-size: 11px; margin-top: 3px; letter-spacing: 0; }
.icon-btn {
  border: 0; border-radius: 14px; padding: 10px 13px;
  background: #fff; color: var(--brand-dark); font-weight: 700;
  box-shadow: 0 4px 14px rgba(22, 52, 61, .06);
}
.clinic-strip {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  max-width: 560px; margin: 0 auto; padding: 4px 18px 14px;
}
.clinic-location { display: grid; gap: 4px; min-width: 0; }
.clinic-open { display: inline-flex; align-items: center; gap: 7px; color: #14826f; font-size: 11px; font-weight: 750; }
.clinic-open i { width: 7px; height: 7px; border-radius: 50%; background: #25b78d; box-shadow: 0 0 0 4px #d9f5e9; }
.clinic-address { color: #728389; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.call-link {
  display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
  padding: 9px 11px; border: 1px solid #dbe9e7; border-radius: 13px;
  background: rgba(255,255,255,.72); color: #087d78; text-decoration: none;
  font-size: 11px; font-weight: 750;
}
.call-link svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.screen { max-width: 440px; padding: 4px 16px 24px; margin: 0 auto; overflow-x: hidden; }
.card {
  padding: 20px; margin-bottom: 14px; border: 1px solid rgba(232, 238, 240, .85);
  border-radius: 23px; background: rgba(255,255,255,.96);
  box-shadow: var(--shadow);
}
.card.flat { box-shadow: none; }
.hero.booking-hero {
  isolation: isolate; min-height: 295px; padding: 23px 22px 17px;
  overflow: hidden; border: 0; border-radius: 27px;
  background: linear-gradient(140deg, #087f7d 0%, #08a094 52%, #2bc1a0 100%);
  box-shadow: 0 14px 34px rgba(5, 137, 130, .20);
}
.booking-hero::before, .booking-hero::after {
  content: ""; position: absolute; z-index: -1; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.14);
}
.booking-hero::before { width: 250px; height: 250px; top: -100px; right: -80px; box-shadow: 0 0 0 24px rgba(255,255,255,.055), 0 0 0 48px rgba(255,255,255,.035); }
.booking-hero::after { width: 100px; height: 100px; bottom: 35px; right: 4px; background: rgba(255,255,255,.055); }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 7px; color: rgba(255,255,255,.82); font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.hero-dot { width: 6px; height: 6px; border-radius: 50%; background: #aaf3d2; }
.booking-hero h1 { margin: 17px 0 8px; font-size: clamp(26px, 7vw, 34px); line-height: 1.08; font-weight: 800; letter-spacing: -.055em; }
.booking-hero h1 span { color: #b6ffe0; }
.booking-hero p { max-width: 270px; color: rgba(255,255,255,.83); font-size: 13px; line-height: 1.5; }
.btn, button.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; border: 0; border-radius: 15px; padding: 13px 16px;
  background: linear-gradient(110deg, #078a86, #23b59e);
  color: #fff; font-size: 14px; font-weight: 750; letter-spacing: -.01em;
  box-shadow: 0 7px 16px rgba(8, 142, 132, .18);
  transition: transform .16s ease, filter .16s ease, box-shadow .16s ease;
}
.btn:active, .doctor-select:active, .qnav:active { transform: scale(.98); }
.booking-hero .hero-cta { position: relative; z-index: 1; width: 100%; margin: 9px 0 12px; background: #fff; color: #087e79; box-shadow: none; }
.booking-hero .hero-cta span { font-size: 19px; line-height: 12px; }
.btn.secondary, button.btn.secondary { background: #eef8f6; border: 1px solid #d6efea; color: #087a76; box-shadow: none; }
.btn.ghost { background: #f2f7f7; color: #087a76; box-shadow: none; }
.btn.danger { background: #fff; color: #c03942; border: 1px solid #f3d8da; box-shadow: none; }
.btn.sm, button.btn.sm, .btn-sm { width: auto; min-height: 40px; padding: 9px 12px; border-radius: 12px; font-size: 12px; }
.hero-help {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 4px 2px;
  border: 0; background: transparent; color: #fff; text-align: left; cursor: pointer;
}
.help-icon { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; border: 1px solid rgba(255,255,255,.28); border-radius: 12px; background: rgba(255,255,255,.13); font-size: 17px; }
.hero-help b, .hero-help small { display: block; }
.hero-help b { font-size: 12px; }
.hero-help small { margin-top: 2px; color: rgba(255,255,255,.78); font-size: 10px; }
.help-arrow { margin-left: auto; font-size: 24px; color: rgba(255,255,255,.75); }
h2 { color: var(--text); font-size: 20px; line-height: 1.2; font-weight: 800; letter-spacing: -.04em; }
h3 { color: var(--text); font-size: 15px; line-height: 1.3; font-weight: 750; letter-spacing: -.025em; }
.muted { color: var(--muted); }
.small { font-size: 12px; line-height: 1.5; }
.section-block { margin: 25px 0 20px; overflow: clip; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 10px; margin: 0 2px 13px; }
.section-heading h2, .section-heading h3 { margin: 3px 0 0; }
.eyebrow { display: block; color: #078b87; font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.link-btn { color: #07847f; font-size: 11px; font-weight: 750; white-space: nowrap; }
.doctor-carousel { display: grid; grid-auto-columns: clamp(215px, 68%, 245px); grid-auto-flow: column; grid-auto-rows: 1fr; align-items: stretch; gap: 12px; overflow-x: auto; overflow-y: hidden; padding: 2px 16px 10px 2px; margin-right: -16px; scrollbar-width: none; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.doctor-carousel::-webkit-scrollbar { display: none; }
.doctor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.doctor-tile {
  min-width: 0; overflow: hidden; border: 1px solid #eaf0f1; border-radius: 20px;
  background: #fff; box-shadow: 0 7px 20px rgba(23, 54, 62, .055);
  display: flex; flex-direction: column; height: 100%;
}
.doctor-carousel .doctor-tile { scroll-snap-align: start; }
.doctor-photo { position: relative; display: grid; place-items: center; height: 150px; aspect-ratio: 16 / 10; overflow: hidden; background: linear-gradient(140deg, #e8f4f2, #d8e7e6); }
.doctor-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.doctor-photo.no-photo { background: radial-gradient(circle at 50% 35%, #e4f6f1, #cee5e1); }
.doctor-initials { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; color: #07847e; background: rgba(255,255,255,.75); font-size: 24px; font-weight: 800; }
.photo-badge { position: absolute; bottom: 8px; left: 8px; padding: 5px 8px; border: 1px solid rgba(255,255,255,.6); border-radius: 99px; background: rgba(255,255,255,.9); color: #087d77; font-size: 9px; font-weight: 750; backdrop-filter: blur(8px); }
.doctor-copy { padding: 12px; }
.doctor-role { margin-bottom: 5px; color: #07847e; font-size: 10px; font-weight: 750; }
.doctor-copy h3 { min-height: 0; margin: 0; font-size: 13px; line-height: 1.38; }
.doctor-meta { margin-top: 5px; color: #829197; font-size: 10px; }
.doctor-bio { margin: 8px 0 0; color: #718187; font-size: 11px; line-height: 1.45; }
.doctor-select {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; min-height: 40px; margin-top: 11px; padding: 9px 11px;
  border: 1px solid #dcefeb; border-radius: 12px; background: #f1faf8;
  color: #087d77; font: inherit; font-size: 11px; font-weight: 750; cursor: pointer;
}
.doctor-select span { font-size: 16px; }
.doctor-tile.compact .doctor-photo { height: 150px; aspect-ratio: 16 / 10; }
.doctor-tile.compact .doctor-copy { padding: 10px 11px 10px; }
.doctor-tile.compact .doctor-copy h3 { min-height: 0; font-size: 12px; }
.doctor-tile.compact .doctor-select { min-height: 36px; margin-top: 8px; font-size: 10px; }
.doctors-page { margin-top: 5px; }
.doctors-page .section-heading { margin: 0 2px 5px; }
.doctors-intro { margin: 0 2px 15px; font-size: 12px; line-height: 1.5; }
.contact-card { display: flex; align-items: center; gap: 11px; padding: 14px; border: 1px solid #e8efef; border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.contact-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 13px; background: #eaf7f4; color: #07847e; font-size: 22px; }
.contact-card div:nth-child(2) { display: grid; gap: 3px; flex: 1; min-width: 0; }
.contact-card b { font-size: 12px; }
.contact-card span { overflow: hidden; color: #74858a; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.contact-card a { color: #07847e; text-decoration: none; font-size: 19px; }
.next-appointment { padding: 17px; }
.next-appointment .section-title { margin-bottom: 9px; }
.item, .slot {
  border-color: #e8eef0; border-radius: 16px; background: #fff;
}
.item.selected, .slot.selected { border-color: #4cb9a6; background: #f0faf7; box-shadow: 0 0 0 3px rgba(51, 179, 153, .08); }
.pill { padding: 5px 9px; font-size: 10px; }
.pill.brand { color: #087b76; background: #e8f7f3; }
.quick-nav {
  position: fixed; z-index: 30; left: 50%; bottom: max(10px, env(safe-area-inset-bottom));
  display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 2px;
  width: min(calc(100% - 24px), 440px); max-width: 440px; padding: 7px; box-sizing: border-box;
  transform: translateX(-50%); border: 1px solid rgba(225, 235, 235, .86);
  border-radius: 21px; background: rgba(255,255,255,.92);
  box-shadow: 0 12px 36px rgba(22, 51, 58, .14); backdrop-filter: blur(18px);
}
.qnav {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 50px; padding: 5px 2px; border: 0; border-radius: 15px;
  background: transparent; color: #89989c; font-size: 9px; font-weight: 700;
}
.qnav svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.qnav:nth-child(4) svg { fill: currentColor; stroke: currentColor; }
.qnav.active { background: #eaf7f4; color: #087f79; }
.quick-nav.hidden { display: none !important; }
.field { margin-bottom: 14px; }
.label { margin-bottom: 7px; color: #52676d; font-size: 12px; font-weight: 700; }
.input, .textarea, select.input {
  min-height: 48px; border: 1px solid #e3eaec; border-radius: 14px; padding: 12px 13px;
  background: #f9fbfb; color: var(--text); font-size: 14px;
}
.textarea { min-height: 104px; line-height: 1.5; }
.input:focus, .textarea:focus { outline: 3px solid rgba(23, 169, 146, .13); border-color: #62baaa; background: #fff; }
.checkline { align-items: flex-start; padding: 10px 12px; border: 1px solid #e7edef; border-radius: 14px; background: #fbfcfc; color: #50646a; font-size: 12px; line-height: 1.45; }
.checkline input { width: 17px; height: 17px; margin-top: 1px; accent-color: #078b87; }
.acute-line { margin: 9px 0; }
.acute-line span { display: grid; gap: 2px; }
.acute-line b { color: #273d42; font-size: 12px; }
.acute-line small { color: #7a8b90; font-size: 10px; }
.triage-intro { display: flex; align-items: center; gap: 10px; margin: 13px 0 18px; padding: 13px; border: 1px solid #dcefeb; border-radius: 16px; background: linear-gradient(120deg, #effaf7, #f7fcfb); }
.triage-spark { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 auto; border-radius: 13px; background: linear-gradient(145deg, #078b87, #28b99c); color: white; font-size: 20px; }
.triage-intro div { display: grid; gap: 3px; }
.triage-intro b { color: #146d68; font-size: 12px; }
.triage-intro span:not(.triage-spark) { color: #71858a; font-size: 10px; line-height: 1.4; }
.quick-symptoms { margin-bottom: 13px; }
.symptom-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.symptom-chip {
  min-height: 35px; padding: 8px 10px; border: 1px solid #e2ebec; border-radius: 99px;
  background: #fff; color: #50656b; font: inherit; font-size: 10px; font-weight: 650; cursor: pointer;
}
.symptom-chip.selected { border-color: #8cd5c4; background: #eaf8f4; color: #087d77; }
.triage-safety, .triage-note { margin: 12px 2px 0; color: #849297; font-size: 10px; line-height: 1.5; }
.triage-doctors { margin: 15px 0 4px; }
.triage-doctors .section-heading { margin-bottom: 9px; }
.triage-note { padding: 10px 11px; border-radius: 12px; background: #f6f9f9; }
.triage-ai-card { border: 1px solid #dcefeb; border-radius: 18px; background: linear-gradient(180deg,#f7fcfb,#ffffff); padding: 14px; box-shadow: 0 8px 24px rgba(15,114,110,.06); }
.triage-ai-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; margin-bottom:12px; }
.triage-ai-title { margin:4px 0 0; font-size:18px; line-height:1.25; color:#173b3f; }
.triage-ai-grid { display:grid; gap:10px; }
.triage-ai-item { background:#fff; border:1px solid #e6efee; border-radius:14px; padding:11px 12px; }
.triage-ai-k { font-size:11px; font-weight:700; color:#6b8287; margin-bottom:4px; text-transform:uppercase; letter-spacing:.02em; }
.triage-ai-v { font-size:14px; color:#173b3f; line-height:1.45; font-weight:600; }
.triage-ai-s { margin-top:4px; font-size:12px; color:#557177; line-height:1.4; }
.triage-icd { display:inline-block; margin-left:4px; padding:2px 7px; border-radius:999px; background:#eef8f6; color:#0f7270; font-size:11px; font-weight:700; vertical-align:middle; }
.triage-ai-flags { margin-top:10px; font-size:12px; color:#8a5c16; background:#fff8e8; border:1px solid #f4e6c0; padding:9px 10px; border-radius:12px; }
.triage-ai-disclaimer { margin-top:10px; font-size:11px; line-height:1.45; color:#74868b; }
.triage-book-doctor { margin-top:10px; width:100%; min-height:38px; font-size:12px; padding:8px 10px; }
.banner { padding: 13px; border-radius: 16px; font-size: 12px; line-height: 1.5; }
.banner.info { color: #236a68; background: #eff9f7; border-color: #d7eeea; }
.banner.warn { color: #8a5c16; background: #fff8e8; border-color: #f4e6c0; }
.banner.danger { color: #a3313b; background: #fff0f1; border-color: #f5d8db; }
.banner.ok { color: #187154; background: #eaf8f0; border-color: #d5efdf; }
.actions { gap: 9px; }
.slot-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
.slot { min-height: 90px; padding: 12px; }
.slot .t { color: #173b3f; font-size: 15px; }
.slot .d { font-size: 10px; line-height: 1.4; }
.hold-bar { border-radius: 14px; font-size: 11px; }
.ticket { padding: 14px; border: 1px dashed #9bcec3; border-radius: 18px; background: #f8fcfb; }
.ticket-row { padding: 8px 0; }
.ticket-row .k { font-size: 11px; }
.ticket-row .v { max-width: 62%; font-size: 12px; }
.fdi-wrap { padding: 9px; border-radius: 16px; }
.fdi-row { gap: 3px; }
.tooth { min-height: 34px; border-radius: 9px; padding: 5px 0; font-size: 10px; }
.toast { bottom: calc(84px + env(safe-area-inset-bottom)); border-radius: 13px; font-size: 12px; }
.empty { padding: 20px 8px; font-size: 12px; }
.spinner { border-top-color: #078b87; }
.divider, hr.sep { border-color: #edf1f2; }
.doctor-card { grid-template-columns: 44px 1fr; }
.avatar { background: #e8f7f4; color: #087d77; }
.hidden { display: none !important; }

@media (min-width: 520px) {
  .hero-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .slot-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .doctor-photo { height: 150px; }
  .doctor-tile.compact .doctor-photo { height: 150px; }
}
@media (max-width: 370px) {
  .topbar { padding-inline: 14px; }
  .clinic-strip { padding-inline: 14px; }
  .screen { padding-inline: 12px; }
  .card { padding: 16px; }
  .doctor-grid { gap: 9px; }
  .doctor-photo { height: 126px; }
  .doctor-copy { padding: 9px; }
  .doctor-copy h3 { font-size: 12px; }
  .doctor-select { padding-inline: 8px; font-size: 10px; }
}

/* Verified clinic identity, opening hours and doctor profiles */
.brand-mark { width: 40px; height: 40px; border-radius: 12px; overflow: hidden; background: #e7f6f3; border: none; box-shadow: none; display:flex; align-items:center; justify-content:center; }
.brand-mark img { display: block; width: 30px; height: 30px; object-fit: contain; background: transparent; }
.phone-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 42px; padding: 9px 12px; border-radius: 14px;
  background: #eaf8f4; color: #087d77; text-decoration: none; white-space: nowrap;
}
.phone-btn svg { width:14px; height:14px; fill:currentColor; flex:0 0 auto; }
.clinic-strip { padding-top: 2px; }
.clinic-open.is-closed { color: #9c5961; }
.clinic-open.is-closed i { background: #d97982; box-shadow: 0 0 0 4px #fae8e9; }
.clinic-hours {
  color: #74868b; font-size: 10px; line-height: 1.35;
}
.clinic-address, .call-link { display: none; }
.doctor-slider { min-width: 0; overflow: hidden; position: relative; z-index: 1; }
.doctor-carousel { cursor: grab; touch-action: auto; }
.doctor-carousel.is-dragging { cursor: grabbing; scroll-behavior: auto; scroll-snap-type: none; user-select: none; }
.doctor-open { cursor: pointer; transition: transform .16s ease, box-shadow .16s ease; position: relative; z-index: 1; pointer-events: auto; }
.doctor-open:hover { transform: translateY(-2px); box-shadow: 0 12px 25px rgba(23,54,62,.11); }
.doctor-open:focus-visible { outline: 3px solid rgba(8, 139, 135, .25); outline-offset: 2px; }
.doctor-open-link {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; box-sizing: border-box;
  margin-top: auto; padding-top: 10px; border-top: 1px solid #edf2f2;
  color: #087d77; font-size: 11px; font-weight: 750;
}
.doctor-open-link span { font-size: 15px; line-height: 1; flex: 0 0 auto; }
.doctor-tile.compact .doctor-open-link { margin-top: 8px; padding-top: 7px; font-size: 9px; }
.slider-controls { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 0 4px; }
.slider-arrow {
  display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto;
  border: 1px solid #e2edeb; border-radius: 12px; background: #fff;
  color: #087d77; font: inherit; font-size: 23px; line-height: 1; cursor: pointer;
}
.slider-arrow:disabled { opacity: .38; cursor: default; }
.slider-dots { display: flex; align-items: center; justify-content: center; gap: 6px; overflow: hidden; }
.slider-dot { width: 6px; height: 6px; padding: 0; border: 0; border-radius: 50%; background: #d8e5e4; cursor: pointer; transition: width .18s ease, background .18s ease; }
.slider-dot.active { width: 18px; border-radius: 99px; background: #0a9a8d; }
.doctor-detail-page { padding-bottom: 18px; }
.back-link {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 7px 2px;
  border: 0; background: transparent; color: #087d77; font: inherit; font-size: 12px; font-weight: 750; cursor: pointer;
}
.back-link span { font-size: 18px; line-height: 1; }
.doctor-detail-card { overflow: hidden; border: 1px solid #e8eff0; border-radius: 25px; background: #fff; box-shadow: var(--shadow); }
.doctor-detail-photo { position: relative; height: min(68vw, 330px); min-height: 245px; overflow: hidden; background: linear-gradient(145deg, #e2f2ef, #d7e7e5); }
.doctor-detail-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 28%; }
.doctor-detail-photo .doctor-initials { position: absolute; inset: 0; margin: auto; }
.doctor-detail-photo .photo-badge { bottom: 14px; left: 14px; padding: 7px 10px; font-size: 10px; }
.doctor-detail-copy { padding: 18px 20px 19px; }
.doctor-detail-copy h1 { margin: 7px 0 5px; color: #172b31; font-size: clamp(23px, 6vw, 30px); line-height: 1.1; letter-spacing: -.045em; }
.doctor-detail-role { margin: 0; color: #07847e; font-size: 13px; font-weight: 700; }
.doctor-children-note { margin-top: 6px; color: #74868b; font-size: 10px; font-weight: 650; }
.doctor-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 16px; }
.doctor-facts div { display: grid; gap: 4px; padding: 11px 12px; border-radius: 14px; background: #f2f9f7; }
.doctor-facts b { color: #156d68; font-size: 13px; }
.doctor-facts span { color: #7b8c90; font-size: 10px; }
.profile-section { margin: 18px 0 0; padding: 18px; border: 1px solid #e8eff0; border-radius: 20px; background: #fff; box-shadow: 0 7px 20px rgba(23,54,62,.045); }
.profile-section h2 { margin: 4px 0 8px; font-size: 18px; }
.profile-section p { margin: 0; color: #697d82; font-size: 12px; line-height: 1.6; }
.profile-service-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.profile-service-chips span { padding: 8px 10px; border: 1px solid #dfeeea; border-radius: 99px; background: #f3faf8; color: #267670; font-size: 10px; font-weight: 650; }
.education-section { background: #f9fbfb; box-shadow: none; }
.profile-booking { margin: 15px 0 0; }
.profile-booking .btn { width: 100%; }
.profile-booking .btn span { font-size: 19px; }
@media (max-width: 370px) {
  .clinic-hours { max-width: 235px; font-size: 9px; }
  .phone-btn { padding-inline: 10px; font-size: 11px; }
  .doctor-facts { gap: 7px; }
  .doctor-facts div { padding: 9px; }
}

/* === UI polish / modal / preview === */
body.modal-open { overflow: hidden; }
.brand { gap: 10px; }
.brand-sub { display: none !important; }



.doctor-carousel { align-items: stretch; }
.doctor-tile { min-height: 0; display: flex; flex-direction: column; height: 100%; }
.doctor-tile .doctor-copy { display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; padding: 12px; min-width: 0; justify-content: flex-start; }
.doctor-tile h3 { margin: 0; font-size: 17px; line-height: 1.25; min-height: 0; }
.doctor-role-badge {
  display: inline-flex; align-self: flex-start; padding: 4px 10px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-dark); font-size: 11px; font-weight: 700;
}
.doctor-meta { color: var(--muted); font-size: 13px; line-height: 1.3; margin: 0; }
.doctor-open-link { display:flex; align-items:center; justify-content:space-between; gap:8px; width:100%; box-sizing:border-box; margin-top:10px; padding-top:10px; color: var(--brand); font-weight: 700; font-size: 13px; border-top: 1px solid rgba(15,23,42,.06); }
.doctor-tile.compact .doctor-photo { height: 150px; aspect-ratio: 16 / 10; }

.doctor-profile { padding: 16px 16px 96px; }
.doctor-profile-hero { display: grid; grid-template-columns: 112px 1fr; gap: 14px; align-items: start; }
.doctor-photo-large { width: 112px; min-height: 140px; border-radius: 16px; }
.doctor-profile-head h2 { margin: 4px 0 10px; font-size: 24px; line-height: 1.2; }
.doctor-profile-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.doctor-section { margin-top: 14px; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: #fbfdfd; }
.doctor-section-title { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.doctor-section-title h3 { margin: 0; font-size: 16px; }
.sec-ic, .info-ic, .edu-ic { width: 28px; height: 28px; min-width: 28px; min-height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--brand-soft); font-size: 15px; flex: 0 0 auto; line-height: 0; }
.sec-ic svg, .info-ic svg, .edu-ic svg, .doctor-section-title svg { width: 18px !important; height: 18px !important; min-width: 18px !important; min-height: 18px !important; max-width: 18px !important; max-height: 18px !important; flex-shrink: 0 !important; display: block !important; }
.doctor-section-text { margin: 0; color: #334155; font-size: 14px; line-height: 1.65; white-space: pre-line; }
.bio-block { position: relative; }
.bio-text { transition: max-height .28s ease; }
.bio-text.is-clamped { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; max-height: calc(1.65em * 5); }
.bio-text.is-expanded { display: block; max-height: 2000px; }
.bio-toggle { margin-top: 8px; padding: 0; border: 0; background: transparent; color: var(--brand, #007f82); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.bio-toggle:hover { color: var(--brand-dark, #00686b); }
.bio-toggle.hidden { display: none; }
.bio-toggle-arr { font-size: 12px; line-height: 1; }

/* education timeline */
.education-timeline { position: relative; display: flex; flex-direction: column; gap: 0; }
.education-timeline::before { content: ''; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(180deg, rgba(0,127,130,.35), rgba(0,127,130,.08)); border-radius: 2px; }
.edu-tl-item { position: relative; display: flex; gap: 12px; padding: 10px 0 10px 0; }
.edu-tl-item + .edu-tl-item { border-top: 1px solid rgba(15,23,42,.06); }
.edu-tl-dot { position: relative; z-index: 1; width: 12px; height: 12px; margin-top: 4px; border-radius: 50%; background: var(--brand, #007f82); box-shadow: 0 0 0 3px rgba(0,127,130,.12); flex: 0 0 auto; }
.edu-tl-body { flex: 1; min-width: 0; }
.edu-tl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; }
.edu-tl-year { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; background: rgba(0,127,130,.08); color: #0f5f61; font-size: 12px; font-weight: 700; line-height: 1.3; }
.edu-tl-level { font-size: 12px; color: #64748b; line-height: 1.35; }
.edu-tl-inst { font-size: 14px; font-weight: 700; color: #1e293b; line-height: 1.4; margin-bottom: 2px; }
.edu-tl-spec { font-size: 13px; color: #64748b; line-height: 1.45; }
.service-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.service-chip { display: inline-flex; align-items: center; padding: 8px 12px; border-radius: 999px; background: #eef7f7; color: #0f5f61; font-size: 13px; font-weight: 600; line-height: 1.2; border: 1px solid rgba(0,127,130,.08); }
.education-block { display: flex; gap: 10px; align-items: flex-start; }

.promo-list { gap: 10px; }
.promo-card-btn { width: 100%; text-align: left; background: #fff; cursor: pointer; padding: 14px 14px 12px; min-height: 0; }
.promo-card-btn .sub { margin-top: 6px; line-height: 1.4; }
.promo-card-btn .doctor-open-link { margin-top: 8px; padding-top: 0; border-top: 0; }
.promo-card-btn:hover { border-color: rgba(0,127,130,.25); background: #fbffff; }
.promo-detail-text { font-size: 14px; line-height: 1.65; color: #334155; white-space: pre-line; }

.modal-root { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: flex-end; justify-content: center; }
.modal-root.hidden { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.45); backdrop-filter: blur(2px); }
.modal-sheet { position: relative; width: min(720px, calc(100vw - 16px)); max-height: calc(100vh - 24px); overflow: auto; background: #fff; border-radius: 20px 20px 12px 12px; box-shadow: 0 20px 60px rgba(15,23,42,.25); margin: 12px 8px calc(8px + env(safe-area-inset-bottom, 0px)); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 18px 0; }
.modal-head h3 { margin: 4px 0 0; font-size: 22px; line-height: 1.25; }
.modal-close { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--border); background: #fff; font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted); }
.modal-body { padding: 16px 18px 20px; }
.info-block { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid rgba(15,23,42,.06); }
.info-block:last-of-type { border-bottom: 0; }
.info-block b { display: block; font-size: 13px; color: var(--muted); margin-bottom: 2px; }
.info-block .link { color: var(--brand); text-decoration: none; font-weight: 600; }
.mb12 { margin-bottom: 12px; }

@media (max-width: 420px) {
  .doctor-profile-hero { grid-template-columns: 96px 1fr; }
  .doctor-photo-large { width: 96px; min-height: 124px; }
  .doctor-tile .doctor-copy { padding: 12px; }
}

/* header v9 compact */
.header-address { background:transparent; border:0; padding:0; margin:0; font:inherit; cursor:pointer; text-align:left; max-width:100%; }
.header-address, .clinic-address-link.header-address { display:inline-flex; align-items:center; gap:4px; color:var(--brand); font-size:12px; font-weight:600; line-height:1.2; white-space:nowrap; }
.header-address span { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.header-address svg { width:13px; height:13px; stroke:currentColor; fill:none; stroke-width:2; flex:0 0 auto; }
.compact-phone { padding:6px 10px; font-size:11.5px; white-space:nowrap; max-width:100%; gap:6px; flex:0 0 auto; }
.topbar-status .clinic-open { font-size:11px; gap:5px; }
.topbar-status .clinic-hours { font-size:11px; color:var(--muted); }
@media (max-width: 420px) {
  .topbar { padding:8px 12px 9px; }
  .brand-mark { width:36px; height:36px; }
  .brand-title { font-size:16px; }
  .compact-phone span { font-size:11px; }
  .compact-phone { padding:6px 10px; }
}


/* service rows in doctor profile */
.service-list{display:flex;flex-direction:column}
.service-row{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px dashed #e3ebf2;font-size:13px;align-items:center}
.service-row:last-child{border-bottom:none;padding-bottom:0}
.service-row-name{font-weight:600;color:#24405a}
.service-row-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.service-row-price{color:#0f766e;font-weight:700;white-space:nowrap}
.service-row-price.is-free{color:#1a7f37;background:#edf7ef;padding:2px 8px;border-radius:999px;font-size:12px}
.service-row-price.muted{color:#6f8497;font-weight:600}
.service-row-dur{color:#5f7285;font-size:12px;background:#f3f7fa;padding:2px 8px;border-radius:999px;white-space:nowrap}


/* === definitive mobile/doctor-card fixes === */
.app { max-width: 440px !important; margin: 0 auto !important; width: 100% !important; position: relative; }
.screen { max-width: 440px !important; margin: 0 auto !important; overflow-x: hidden !important; }
.quick-nav { max-width: 440px !important; width: min(calc(100% - 24px), 440px) !important; left: 50% !important; transform: translateX(-50%) !important; }
.doctor-slider { min-width: 0; overflow: hidden; position: relative; z-index: 2; }
.doctor-carousel { display: grid !important; grid-auto-flow: column; grid-auto-columns: clamp(215px, 68%, 245px); grid-auto-rows: 1fr !important; align-items: stretch !important; gap: 12px; overflow-x: auto; overflow-y: hidden; padding: 2px 16px 10px 2px; margin-right: -16px; scrollbar-width: none; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.doctor-carousel::-webkit-scrollbar { display: none; }
.doctor-tile.doctor-open { display: flex !important; flex-direction: column !important; height: 100% !important; min-height: 0; overflow: hidden; position: relative; z-index: 2; pointer-events: auto !important; cursor: pointer; }
.doctor-tile .doctor-copy { display: flex !important; flex-direction: column !important; flex: 1 1 auto !important; gap: 6px; padding: 12px !important; min-width: 0; }
.doctor-tile .doctor-copy h3 { min-height: 0; margin: 0; }
.doctor-tile .doctor-open-link { display: flex !important; align-items: center !important; justify-content: space-between !important; gap: 8px; width: 100% !important; box-sizing: border-box; margin-top: 8px !important; padding-top: 8px; border-top: 1px solid rgba(15,23,42,.08); color: var(--brand, #0a8a87); font-weight: 700; font-size: 13px; }
.doctor-tile .doctor-open-link span { flex: 0 0 auto; font-size: 15px; line-height: 1; }
.doctor-tile.compact .doctor-copy { padding: 10px 11px 10px !important; }

/* === triage doctors: горизонтальная карусель с фиксированным слайдом === */
.doctors-slider { min-width: 0; position: relative; }
.triage-doctors-carousel {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scroll-snap-type: x mandatory !important;
  -webkit-overflow-scrolling: touch;
  gap: 12px !important;
  padding: 4px 16px 12px !important;
  margin: 0 -16px !important;
  scrollbar-width: none;
}
.triage-doctors-carousel::-webkit-scrollbar { display: none; }
.triage-doctors-carousel .doctor-slide {
  /* ~1.7–1.8 карточки рядом на телефоне: вторая сразу видна справа. */
  flex: 0 0 185px !important;
  width: 185px !important;
  min-width: 185px !important;
  max-width: 195px !important;
  scroll-snap-align: start !important;
  box-sizing: border-box !important;
  display: flex !important;
}
.triage-doctors-carousel .doctor-tile {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: auto !important;
  flex: 1 1 auto !important;
}
.triage-doctors-carousel .doctor-photo {
  height: 140px !important;
  aspect-ratio: auto !important;
}
.triage-doctors-carousel .doctor-photo img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center 15% !important;
}
.triage-doctors-carousel .doctor-copy { min-width: 0 !important; padding: 10px 10px 10px !important; }
.triage-doctors-carousel .doctor-tile h3 {
  width: 100% !important;
  box-sizing: border-box !important;
  word-wrap: break-word !important;
  overflow-wrap: anywhere !important;
  white-space: normal !important;
  min-height: 0 !important;
  font-size: 13.5px !important;
  line-height: 1.3 !important;
}
.triage-doctors-carousel .triage-book-doctor {
  width: 100% !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
  min-height: 36px !important;
  padding: 8px 10px !important;
  font-size: 12px !important;
}
.doctors-slider .slider-controls { margin-top: 6px; }

/* === кнопка врача всегда у нижнего края карточки ===
   Карточки в карусели и в каталоге имеют разное число строк в описании.
   Растягиваем SLOT/GRID и сами карточки, текстовый блок занимает всё
   свободное место, а кнопка прижимается к низу через margin-top: auto. */
.doctors-slider, .triage-doctors-carousel, .doctor-carousel, .doctor-grid {
  align-items: stretch !important;
}
.triage-doctors-carousel .doctor-slide { align-items: stretch !important; }
.doctor-tile,
.doctor-tile.doctor-open,
.triage-doctors-carousel .doctor-tile {
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  align-items: stretch !important;
  height: 100% !important;
}
.doctor-copy,
.doctor-tile .doctor-copy,
.triage-doctors-carousel .doctor-copy {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  align-items: stretch !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
.doctor-tile .triage-book-doctor,
.doctor-tile .doctor-select,
.doctor-tile .doctor-open-link,
.triage-doctors-carousel .triage-book-doctor {
  display: flex !important;
  align-items: center !important;
  flex: 0 0 auto !important;
  margin-top: auto !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
.doctor-tile .doctor-open-link { justify-content: space-between !important; }

/* === header card refresh === */
body, .app { background: #f3f6f6 !important; }
.topbar { background: #ffffff !important; border-bottom: 1px solid rgba(15,23,42,0.06) !important; box-shadow: 0 2px 10px rgba(15,23,42,0.03) !important; margin: 0 auto !important; max-width: 440px !important; width: 100% !important; box-sizing: border-box !important; border-radius: 0 0 22px 22px !important; padding: 14px 16px 12px !important; top: 0 !important; }
.screen { max-width: 440px !important; margin: 0 auto !important; padding-left: 16px !important; padding-right: 16px !important; box-sizing: border-box !important; overflow-x: hidden !important; }
.brand-mark { width: 40px !important; height: 40px !important; border-radius: 12px !important; background: #e7f6f3 !important; border: none !important; box-shadow: none !important; display:flex !important; align-items:center !important; justify-content:center !important; overflow:hidden !important; }
.brand-mark img { width: 30px !important; height: 30px !important; object-fit: contain !important; background: transparent !important; display:block !important; }
.header-address, .clinic-address-link.header-address { white-space: nowrap !important; font-size: 12px; }
.header-address span, #clinicAddressText { white-space: nowrap !important; }
.compact-phone { padding: 6px 10px !important; font-size: 11.5px !important; white-space: nowrap !important; gap: 6px !important; }
.topbar-status { display:flex !important; align-items:center !important; flex-wrap:wrap !important; gap:6px !important; margin-top:10px !important; padding:6px 10px !important; background:#f5f8f8 !important; border-radius:10px !important; border-top:0 !important; font-size:11px !important; }
.topbar-status .clinic-open, .topbar-status .clinic-hours { font-size:11px !important; }

/* === doctor profile icon iOS fix === */
.doctor-profile { padding-bottom: 96px !important; }
.doctor-section-title .sec-ic, .doctor-section-title .info-ic, .doctor-section-title .edu-ic { width: 28px !important; height: 28px !important; min-width: 28px !important; min-height: 28px !important; flex: 0 0 auto !important; display: inline-flex !important; align-items: center !important; justify-content: center !important; line-height: 0 !important; }
.doctor-section-title .sec-ic svg, .doctor-section-title .info-ic svg, .doctor-section-title .edu-ic svg, .sec-ic svg, .info-ic svg, .edu-ic svg { width: 18px !important; height: 18px !important; min-width: 18px !important; min-height: 18px !important; max-width: 18px !important; max-height: 18px !important; flex-shrink: 0 !important; display: block !important; overflow: visible !important; }

/* === отменённая запись: сразу видна в списке и карточке === */
.pill.status-cancelled {
  background: #FEE2E2 !important;
  border: 1px solid #EF4444 !important;
  color: #B91C1C !important;
  font-weight: 700 !important;
}
.item.is-cancelled, .banner.is-cancelled {
  background: #FEE2E2 !important;
  border: 1px solid #EF4444 !important;
  color: #B91C1C !important;
}
.item.is-cancelled .title, .item.is-cancelled .sub, .banner.is-cancelled b { color: #B91C1C !important; }
.card.is-cancelled, .section.is-cancelled {
  background: #FEE2E2 !important;
  border: 1px solid #EF4444 !important;
  color: #B91C1C !important;
}
.spinner.sm { width: 16px; height: 16px; border-width: 2px; margin: 0; display: inline-block; vertical-align: middle; }

/* === Выбор времени: компактный календарь и окна выбранного дня === */
.booking-summary { display: grid !important; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 10px !important; }
.booking-summary > div { background: #f4faf9 !important; border: 1px solid #dcefea !important; border-radius: 12px !important; padding: 7px 10px !important; min-width: 0; }
.booking-summary span { display: block; color: #6a8b88 !important; font-size: 9.5px !important; font-weight: 700 !important; letter-spacing: .04em; text-transform: uppercase; }
.booking-summary b { display: block; margin-top: 2px; color: #173b3f !important; font-size: 12px !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-card { padding: 12px !important; }
.day-slots-card { padding: 12px 12px 14px !important; }
.cal-head { display: flex !important; align-items: center !important; justify-content: space-between !important; gap: 8px; margin-bottom: 6px; }
.cal-title { color: #123e42 !important; font-size: 13.5px !important; font-weight: 800 !important; letter-spacing: .01em; }
.cal-nav { width: 26px !important; height: 26px !important; min-width: 26px !important; border-radius: 8px !important; border: 1px solid #d7ece7 !important; background: #f0faf7 !important; color: #0d9488 !important; font-size: 17px !important; line-height: 1 !important; cursor: pointer !important; display: inline-flex !important; align-items: center !important; justify-content: center !important; padding: 0 !important; }
.cal-nav:active { transform: scale(.94); }
.cal-weekdays, .cal-grid { display: grid !important; grid-template-columns: repeat(7, minmax(0, 1fr)) !important; gap: 3px !important; }
.cal-weekdays { margin-bottom: 4px; }
.cal-weekdays span { text-align: center; color: #7b9695 !important; font-size: 9.5px !important; font-weight: 700 !important; }
.cal-day { position: relative !important; height: 35px !important; min-height: 35px !important; aspect-ratio: auto !important; border: 1px solid transparent !important; border-radius: 9px !important; background: transparent !important; color: #173b3f !important; font-size: 13px !important; font-weight: 600 !important; display: flex !important; align-items: center !important; justify-content: center !important; padding: 0 0 3px !important; cursor: pointer !important; transition: background .15s, color .15s, box-shadow .15s; }
.cal-day.available { background: #e9f7f3 !important; border-color: #d5efe7 !important; }
.cal-day.available:hover { background: #d9f1ea !important; }
.cal-day.selected, .cal-day.selected:hover { background: #0d9488 !important; color: #ffffff !important; font-weight: 800 !important; border-color: #0d9488 !important; box-shadow: 0 4px 10px rgba(13, 148, 136, .24) !important; }
.cal-day.disabled, .cal-day.weekend, .cal-day.cal-blank { color: #cbd5e1 !important; background: transparent !important; border-color: transparent !important; box-shadow: none !important; cursor: default !important; opacity: 1 !important; }
.cal-dot { position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%); width: 3px; height: 3px; border-radius: 50%; background: #0d9488; }
.cal-day.selected .cal-dot { background: #ffffff; }
.cal-legend { display: flex !important; flex-wrap: wrap !important; justify-content: space-between !important; gap: 6px; margin-top: 6px; color: #8aa1a1 !important; font-size: 9.5px !important; }
.cal-legend span { display: inline-flex !important; align-items: center !important; gap: 4px; }
.cal-legend .cal-dot { position: static; transform: none; display: inline-block; }
.day-slots-title { display: flex !important; align-items: baseline !important; justify-content: space-between !important; gap: 8px; margin-bottom: 7px; }
.day-slots-title b { color: #123e42 !important; font-size: 13px !important; }
.day-slots-title span { color: #87a09f !important; font-size: 10.5px !important; white-space: nowrap; }
.time-grid { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 7px !important; }
.time-chip { position: relative !important; border: 1px solid #dcefea !important; border-radius: 11px !important; background: #ffffff !important; padding: 8px 9px !important; min-height: 56px; cursor: pointer !important; transition: transform .12s, border-color .12s, background .12s; }
.time-chip:active { transform: scale(.98); }
.time-chip.selected, .time-chip.selected:hover,
.time-chip[aria-pressed="true"], .time-chip[aria-pressed="true"]:hover,
.slot-card.is-selected, .slot-card.is-selected:hover,
.slot-card[aria-pressed="true"], .slot-card[aria-pressed="true"]:hover,
.slot.selected, .slot.selected:hover,
.slot[aria-pressed="true"], .slot[aria-pressed="true"]:hover {
  border: 2px solid #0d9488 !important;
  background: #e6f7f5 !important;
  padding: 7px 8px !important;
  box-shadow: 0 4px 12px rgba(13, 148, 136, .2) !important;
  color: #0f172a !important;
}
.chip-check { position: absolute !important; top: 4px !important; right: 5px !important; width: 14px !important; height: 14px !important; border-radius: 50% !important; background: #0d9488 !important; color: #ffffff !important; font-size: 10px !important; font-weight: 800 !important; line-height: 14px !important; text-align: center !important; }
.time-chip .t { color: #173b3f !important; font-size: 13px !important; font-weight: 800 !important; letter-spacing: .01em; }
.time-chip .d { color: #6f8a89 !important; font-size: 10px !important; line-height: 1.3; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.time-chip .tags { margin-top: 4px; }
.time-chip .pill { font-size: 9px; padding: 2px 5px; }
.booking-cta-spacer { height: 96px; }
.booking-cta { position: fixed !important; z-index: 39 !important; left: 50% !important; transform: translateX(-50%) !important; bottom: calc(82px + env(safe-area-inset-bottom, 0px)) !important; width: min(440px, calc(100% - 24px)) !important; padding: 8px 12px !important; background: #ffffff !important; border: 1px solid #dcefea !important; border-radius: 14px !important; box-shadow: 0 -4px 16px rgba(15, 23, 42, .08) !important; }
.booking-cta .btn { width: 100% !important; }
@media (min-width: 520px) { .time-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }

/* === Мои записи: предстоящие приёмы и свёрнутый архив === */
.upcoming-card .list { margin-top: 8px !important; }
.upcoming-card .section-title { gap: 8px; }
.upcoming-empty { display: flex !important; flex-direction: column !important; align-items: center !important; gap: 10px; padding: 18px 8px !important; }
.archive-card { padding: 0 !important; overflow: hidden; }
.archive-toggle { width: 100% !important; display: flex !important; align-items: center !important; gap: 8px !important; padding: 14px 16px !important; border: 0 !important; border-radius: 16px !important; background: transparent !important; color: #123e42 !important; font-size: 13.5px !important; font-weight: 800 !important; text-align: left !important; cursor: pointer !important; }
.archive-toggle:active { background: #f4faf9 !important; }
.archive-arrow { display: inline-block !important; min-width: 14px; color: #0d9488 !important; font-size: 15px !important; line-height: 1 !important; }
.archive-body { display: grid !important; grid-template-rows: 0fr; transition: grid-template-rows .26s ease; }
.archive-body.open { grid-template-rows: 1fr; }
.archive-body-inner { min-height: 0 !important; overflow: hidden !important; padding: 0 12px 12px !important; }
.archive-body:not(.open) .archive-body-inner { visibility: hidden; }
.archive-body.open .archive-body-inner { visibility: visible; }

/* Плашка «Слот забронирован на 10 минут» полностью скрыта. */
.hold-bar, .hold-bar[style] { display: none !important; }
