/* New online booking page (/book, /t/{reference}). Mobile first; checked at 375 px.
   Colours come from tokens; --bk-brand is the hospital's colour (System > Online Ticketing > Ticketing UI Colour). */
:root {
    --bk-brand: #0e7490;
    --bk-brand-ink: #ffffff;
    --bk-brand-soft: color-mix(in srgb, var(--bk-brand) 10%, #ffffff);
    --bk-brand-line: color-mix(in srgb, var(--bk-brand) 28%, #ffffff);
    --bk-brand-deep: color-mix(in srgb, var(--bk-brand) 82%, #000000);
    /* the colour used as text on white: set by the page from the hospital's colour (darkened until it reads well) */
    --bk-brand-text: var(--bk-brand-deep);
    --bk-ok: #047857;
    --bk-ok-soft: #ecfdf5;
    --bk-warn: #b45309;
    --bk-warn-soft: #fffbeb;
    --bk-bad: #b91c1c;
    --bk-bad-soft: #fef2f2;
    --bk-bg: #f3f7f9;
    --bk-card: #ffffff;
    --bk-ink: #0f172a;
    --bk-ink-2: #475569;
    --bk-ink-3: #64748b;
    --bk-line: #e2e8f0;
    --bk-radius: 16px;
    --bk-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
    --bk-font: "Inter", "Noto Sans Devanagari", "Nirmala UI", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.bk-body {
    margin: 0;
    background: var(--bk-bg);
    color: var(--bk-ink);
    font-family: var(--bk-font);
    font-size: 16px;
    line-height: 1.5;
    min-height: 100vh;
    min-height: 100dvh;
}
/* a soft wash of the hospital's colour behind the page */
body.bk-body::before {
    content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background:
        radial-gradient(900px 500px at 100% 0%, color-mix(in srgb, var(--bk-brand) 9%, transparent), transparent 70%),
        radial-gradient(700px 500px at 0% 100%, color-mix(in srgb, var(--bk-brand) 7%, transparent), transparent 70%);
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.bk-ico { width: 24px; height: 24px; flex: none; }

/* ---------- header: compact bar on every step, tall photo slider ("is-hero") on the first screen */
.bk-head {
    position: relative; isolation: isolate; overflow: hidden;
    background: linear-gradient(160deg, var(--bk-brand) 0%, var(--bk-brand-deep) 100%);
    color: var(--bk-brand-ink);
    padding: 16px 16px 56px;
}
.bk-head-in { max-width: 720px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.bk-logo {
    width: 48px; height: 48px; border-radius: 14px; flex: none;
    background: rgba(255, 255, 255, .16); display: grid; place-items: center; overflow: hidden;
}
.bk-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.bk-logo .bk-ico { width: 28px; height: 28px; }
.bk-hname { flex: 1; min-width: 0; }
.bk-hname b { display: block; font-size: 18px; line-height: 1.25; font-weight: 700; overflow-wrap: anywhere; }
.bk-hname span { display: block; font-size: 13px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-lang {
    display: inline-flex; background: rgba(255, 255, 255, .16); border-radius: 999px; padding: 3px; flex: none;
    margin-left: auto; color: var(--bk-brand-ink);
}
.bk-lang button {
    border: 0; background: transparent; color: inherit; min-width: 44px; height: 38px; border-radius: 999px;
    font-size: 14px; font-weight: 600; padding: 0 10px; transition: background-color .2s ease, color .2s ease;
}
.bk-lang button[aria-pressed="true"] { background: #fff; color: var(--bk-brand-text); }

/* the hospital's photos, behind the header in both looks */
.bk-slides, .bk-shade { position: absolute; inset: 0; z-index: -1; }
.bk-slides img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    opacity: 0; transform: scale(1.02); transition: opacity 1.1s ease; user-select: none; -webkit-user-drag: none;
}
.bk-slides img.is-on { opacity: 1; }
.bk-head.is-playing .bk-slides img.is-on { animation: bk-kenburns 7s ease-out forwards; }
@keyframes bk-kenburns { from { transform: scale(1.02); } to { transform: scale(1.1); } }
/* compact: the colour almost covers the photo, so the bar reads as a coloured bar with a hint of the place */
.bk-shade { background: linear-gradient(160deg, color-mix(in srgb, var(--bk-brand) 94%, transparent), color-mix(in srgb, var(--bk-brand-deep) 96%, transparent)); transition: opacity .35s ease; }

.bk-hero { display: none; }
.bk-head.is-hero { display: flex; flex-direction: column; min-height: clamp(230px, 34vh, 300px); padding-bottom: 64px; }
.bk-head.is-hero.has-slides { min-height: clamp(320px, 52vh, 460px); color: #fff; touch-action: pan-y; }
/* hero: the photo shows; a dark veil at the bottom and a little colour at the top keep the text readable on any photo */
.bk-head.is-hero.has-slides .bk-shade {
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--bk-brand) 55%, transparent) 0%, transparent 34%),
        linear-gradient(0deg, rgba(8, 15, 28, .94) 0%, rgba(8, 15, 28, .8) 30%, rgba(8, 15, 28, .5) 58%, rgba(8, 15, 28, .12) 86%);
}
.bk-head.is-hero.has-slides .bk-slides img { filter: brightness(.86) saturate(.95); }
.bk-head.is-hero.has-slides .bk-hero { text-shadow: 0 1px 12px rgba(8, 15, 28, .6); }
.bk-head.is-hero.has-slides .bk-lang { color: #fff; background: rgba(15, 23, 42, .35); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.bk-head.is-hero.has-slides .bk-logo { background: rgba(15, 23, 42, .35); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.bk-head.is-hero .bk-hname { visibility: hidden; }
.bk-head.is-hero .bk-hero {
    display: block; width: 100%; max-width: 720px; margin: auto auto 0; padding-top: 28px;
    animation: bk-rise .5s cubic-bezier(.2, .8, .2, 1) both;
}
.bk-hero p { margin: 0; }
.bk-hero-kicker { font-size: 13px; font-weight: 600; letter-spacing: .02em; opacity: .9; }
.bk-hero-name { font-size: clamp(28px, 7.4vw, 44px); line-height: 1.15; font-weight: 800; letter-spacing: -.02em; margin: 4px 0 6px !important; text-wrap: balance; overflow-wrap: anywhere; }
.bk-hero-sub { font-size: 15px; opacity: .92; }
.bk-hero-nav { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.bk-hero-nav[hidden] { display: none; }
.bk-dots { display: flex; align-items: center; gap: 2px; }
/* each dot is a 28 px touch target; the one in view is a bar that fills while its photo is shown */
.bk-dot { width: 28px; height: 28px; border: 0; background: transparent; padding: 0; display: grid; place-items: center; transition: width .3s ease; }
.bk-dot span { display: block; width: 8px; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .55); overflow: hidden; position: relative; transition: width .3s ease, background-color .3s ease; }
.bk-dot.is-on { width: 44px; }
.bk-dot.is-on span { width: 34px; height: 6px; background: rgba(255, 255, 255, .35); }
.bk-dot.is-on span::after { content: ""; position: absolute; inset: 0; background: #fff; transform-origin: left; }
.bk-dot.is-run span::after { animation: bk-dot-run var(--bk-slide-time, 6s) linear both; }
@keyframes bk-dot-run { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.bk-hero-pause {
    width: 32px; height: 32px; border-radius: 50%; border: 0; padding: 0; margin-left: auto; display: grid; place-items: center;
    background: rgba(15, 23, 42, .35); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.bk-hero-pause .bk-ico { width: 16px; height: 16px; }
.bk-hero-pause .bk-i-play, .bk-hero-pause[aria-pressed="true"] .bk-i-pause { display: none; }
.bk-hero-pause[aria-pressed="true"] .bk-i-play { display: block; }
@keyframes bk-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (min-width: 760px) {
    .bk-head.is-hero.has-slides { min-height: clamp(380px, 56vh, 520px); }
    .bk-hero-sub { font-size: 17px; }
}

/* ---------- shell */
.bk-main { max-width: 720px; margin: -40px auto 0; padding: 0 16px 120px; }
.bk-main { position: relative; z-index: 1; }
.bk-card {
    background: var(--bk-card); border-radius: 20px; box-shadow: var(--bk-shadow);
    padding: 20px 16px;
}
/* each screen comes in with a short rise; views that only redraw themselves do not */
.bk-enter > .bk-card { animation: bk-rise .32s cubic-bezier(.2, .8, .2, 1) both; }
.bk-enter > .bk-card + .bk-card { animation-delay: .08s; }
.bk-card + .bk-card { margin-top: 14px; }
@media (min-width: 600px) { .bk-card { padding: 24px; } }

.bk-test {
    background: var(--bk-warn-soft); color: var(--bk-warn); border: 1px dashed #f59e0b; border-radius: 12px;
    font-size: 13px; font-weight: 600; padding: 8px 12px; margin-bottom: 12px; text-align: center;
}

/* ---------- steps: numbered dots on a line; done steps show a tick */
.bk-steps { display: flex; margin: 2px 0 20px; padding: 0; list-style: none; }
.bk-steps li { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--bk-ink-3); text-align: center; }
.bk-steps li::before {
    content: ""; position: absolute; top: 13px; right: 50%; width: 100%; height: 3px; border-radius: 999px; background: var(--bk-line);
    transition: background-color .3s ease; z-index: 0;
}
.bk-steps li:first-child::before { display: none; }
.bk-step-dot {
    position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
    background: #fff; border: 2px solid var(--bk-line); color: var(--bk-ink-3); font-size: 13px; font-weight: 700;
    transition: background-color .3s ease, border-color .3s ease, color .3s ease, box-shadow .3s ease;
}
.bk-step-dot .bk-ico { width: 15px; height: 15px; stroke-width: 3; }
.bk-steps li.is-done::before, .bk-steps li.is-on::before { background: var(--bk-brand); }
.bk-steps li.is-done .bk-step-dot { background: var(--bk-brand); border-color: var(--bk-brand); color: var(--bk-brand-ink); }
.bk-steps li.is-on .bk-step-dot { border-color: var(--bk-brand); color: var(--bk-brand-text); box-shadow: 0 0 0 5px var(--bk-brand-soft); }
.bk-steps li.is-on { color: var(--bk-brand-text); }
.bk-steps li.is-done { color: var(--bk-ink-2); }

.bk-h { font-size: 22px; line-height: 1.3; margin: 0 0 4px; font-weight: 700; letter-spacing: -.01em; }
.bk-sub { margin: 0 0 16px; color: var(--bk-ink-2); font-size: 15px; }
.bk-back {
    display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; color: var(--bk-brand-text);
    font-weight: 600; font-size: 15px; height: 44px; padding: 0 8px 0 0; margin: -8px 0 4px -4px;
}
.bk-back .bk-ico { width: 20px; height: 20px; }

/* ---------- search + departments */
.bk-search { position: relative; margin-bottom: 14px; }
.bk-search .bk-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--bk-ink-3); width: 20px; height: 20px; }
.bk-search input {
    width: 100%; height: 50px; border-radius: 14px; border: 1.5px solid var(--bk-line); background: #fff;
    padding: 0 14px 0 44px; font-size: 16px; outline: none;
}
.bk-search input:focus { border-color: var(--bk-brand); box-shadow: 0 0 0 4px var(--bk-brand-soft); }

.bk-depts { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .bk-depts { grid-template-columns: 1fr 1fr; } }
.bk-dept {
    display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
    background: #fff; border: 1.5px solid var(--bk-line); border-radius: 14px; padding: 12px; min-height: 72px;
    transition: border-color .15s ease, box-shadow .15s ease, transform .1s ease;
}
.bk-dept:hover { border-color: var(--bk-brand-line); box-shadow: 0 6px 18px rgba(15, 23, 42, .08); transform: translateY(-1px); }
.bk-dept:active { transform: scale(.985); }
.bk-dept > .bk-ico { transition: transform .2s ease, color .2s ease; }
.bk-dept:hover > .bk-ico { transform: translateX(3px); color: var(--bk-brand-text); }
/* the list comes in one after another (the first ten; the rest together) */
.bk-enter .bk-dept { animation: bk-rise .36s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(60ms + var(--i, 0) * 38ms); }
.bk-dept-ico {
    width: 48px; height: 48px; border-radius: 14px; color: var(--bk-brand-text);
    background: linear-gradient(145deg, var(--bk-brand-soft), color-mix(in srgb, var(--bk-brand) 20%, #ffffff));
    display: grid; place-items: center; flex: none;
}
.bk-dept-img { width: 30px; height: 30px; object-fit: contain; }
.bk-dept-name { flex: 1; min-width: 0; }
.bk-dept-name b { display: block; font-size: 16px; font-weight: 650; line-height: 1.3; overflow-wrap: anywhere; }
.bk-dept-name span { display: block; font-size: 13px; color: var(--bk-ink-3); overflow-wrap: anywhere; }
.bk-fee {
    flex: none; font-weight: 700; font-size: 14px; color: var(--bk-brand-text); background: var(--bk-brand-soft);
    border-radius: 999px; padding: 5px 10px; white-space: nowrap;
}
.bk-dept > .bk-ico { color: var(--bk-ink-3); width: 20px; height: 20px; }

/* ---------- units + days */
.bk-unit { border: 1.5px solid var(--bk-line); border-radius: 14px; padding: 14px 12px; }
.bk-unit + .bk-unit { margin-top: 12px; }
.bk-unit-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.bk-unit-head .bk-dept-ico { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; }
.bk-unit-head .bk-dept-ico .bk-ico { width: 26px; height: 26px; }
.bk-unit-head .bk-dept-ico .bk-dept-img { width: 36px; height: 36px; }
.bk-unit-head b { display: block; font-size: 16px; font-weight: 650; line-height: 1.3; }
.bk-unit-head > div > span { display: block; font-size: 13px; color: var(--bk-ink-3); }
.bk-days { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 -2px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.bk-days::-webkit-scrollbar { height: 6px; }
.bk-days::-webkit-scrollbar-thumb { background: var(--bk-line); border-radius: 999px; }
.bk-day {
    flex: none; width: 96px; min-height: 124px; scroll-snap-align: start; text-align: center;
    border: 1.5px solid var(--bk-line); background: #fff; border-radius: 14px; padding: 10px 6px;
    display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 2px;
    transition: border-color .15s ease, background-color .15s ease, transform .1s ease;
}
.bk-day:active:not(:disabled) { transform: scale(.97); }
.bk-day small { font-size: 12px; color: var(--bk-ink-3); font-weight: 600; }
.bk-day strong { font-size: 28px; line-height: 1.1; font-weight: 700; }
.bk-day em { font-style: normal; font-size: 12px; color: var(--bk-ink-2); }
.bk-day i {
    font-style: normal; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 8px; margin-top: 4px;
    background: var(--bk-ok-soft); color: var(--bk-ok);
}
.bk-day.is-low i { background: var(--bk-warn-soft); color: var(--bk-warn); }
.bk-day:disabled { background: #f8fafc; cursor: not-allowed; }
.bk-day:disabled strong, .bk-day:disabled small, .bk-day:disabled em { color: #94a3b8; }
.bk-day:disabled i { background: #f1f5f9; color: var(--bk-ink-3); }
.bk-day[aria-pressed="true"] { border-color: var(--bk-brand); background: var(--bk-brand-soft); box-shadow: 0 0 0 3px var(--bk-brand-soft); transform: translateY(-2px); }
.bk-day:hover:not(:disabled):not([aria-pressed="true"]) { border-color: var(--bk-brand-line); }
.bk-time { margin-top: 8px; font-size: 13px; color: var(--bk-ink-2); display: flex; align-items: center; gap: 6px; }
.bk-time .bk-ico { width: 16px; height: 16px; }

/* ---------- form */
.bk-form { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.bk-field { grid-column: 1 / -1; min-width: 0; }
.bk-field.is-half { grid-column: span 1; }
.bk-field label, .bk-field .bk-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--bk-ink); }
.bk-field label small { font-weight: 400; color: var(--bk-ink-3); }
.bk-req { color: var(--bk-bad); font-weight: 700; margin-left: 3px; }
.bk-input::placeholder { color: var(--bk-ink-3); opacity: .75; }
.bk-input, .bk-select {
    width: 100%; height: 50px; border-radius: 12px; border: 1.5px solid var(--bk-line); background: #fff;
    padding: 0 14px; font-size: 16px; outline: none; appearance: none; -webkit-appearance: none;
}
.bk-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; padding-right: 40px;
}
.bk-input:focus, .bk-select:focus { border-color: var(--bk-brand); box-shadow: 0 0 0 4px var(--bk-brand-soft); }
.bk-field.has-error .bk-input, .bk-field.has-error .bk-select, .bk-field.has-error .bk-seg { border-color: var(--bk-bad); }
.bk-hint { font-size: 13px; color: var(--bk-ink-3); margin-top: 5px; }
.bk-err { font-size: 13px; color: var(--bk-bad); margin-top: 5px; font-weight: 500; display: none; }
.bk-field.has-error .bk-err { display: block; }
.bk-field.has-error .bk-hint { display: none; }
.bk-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1.5px solid var(--bk-line); border-radius: 12px; overflow: hidden; height: 50px; background: #fff; }
.bk-seg button { border: 0; background: transparent; font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.bk-seg button .bk-ico { width: 19px; height: 19px; flex: none; }
.bk-seg button + button { border-left: 1.5px solid var(--bk-line); }
.bk-seg button[aria-pressed="true"] { background: var(--bk-brand); color: var(--bk-brand-ink); }

/* ---------- summary */
.bk-sum { border: 1.5px solid var(--bk-line); border-radius: 14px; overflow: hidden; }
.bk-sum-row { display: flex; gap: 12px; padding: 12px 14px; align-items: flex-start; }
.bk-sum-row + .bk-sum-row { border-top: 1px solid var(--bk-line); }
.bk-sum-row .bk-ico { color: var(--bk-brand-text); width: 20px; height: 20px; margin-top: 2px; }
.bk-sum-row div { min-width: 0; flex: 1; }
.bk-sum-row span { display: block; font-size: 12px; color: var(--bk-ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.bk-sum-row b { display: block; font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.bk-sum-row em { display: block; font-style: normal; font-size: 14px; color: var(--bk-ink-2); }
.bk-total {
    display: flex; align-items: baseline; justify-content: space-between; margin: 16px 0 6px;
    padding: 14px; border-radius: 14px; background: var(--bk-brand-soft);
}
.bk-total span { font-size: 15px; font-weight: 600; color: var(--bk-brand-text); }
.bk-total b { font-size: 30px; font-weight: 800; color: var(--bk-brand-text); letter-spacing: -.02em; }
.bk-methods { display: grid; gap: 10px; margin-top: 8px; }
.bk-method {
    display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; min-height: 64px;
    border: 1.5px solid var(--bk-line); background: #fff; border-radius: 14px; padding: 10px 12px;
}
.bk-method[aria-pressed="true"] { border-color: var(--bk-brand); background: var(--bk-brand-soft); }
.bk-method b { display: block; font-size: 16px; font-weight: 650; }
.bk-method > span > span { display: block; font-size: 13px; color: var(--bk-ink-2); }
.bk-method .bk-radio {
    width: 24px; height: 24px; border-radius: 50%; border: 2px solid #94a3b8; flex: none;
    margin-left: auto; display: grid; place-items: center; background: #fff;
}
.bk-method[aria-pressed="true"] .bk-radio { border-color: var(--bk-brand); }
.bk-method[aria-pressed="true"] .bk-radio::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--bk-brand); }
.bk-note { font-size: 13px; color: var(--bk-ink-3); margin: 10px 0 0; }
/* Cloudflare's browser check, above the pay button on the review step */
.bk-captcha { margin-top: 12px; min-height: 66px; display: flex; justify-content: center; }

/* ---------- buttons, bottom bar */
.bk-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
    min-height: 54px; border-radius: 14px; border: 0; padding: 0 18px; font-size: 17px; font-weight: 700;
    background: linear-gradient(180deg, color-mix(in srgb, var(--bk-brand) 92%, #ffffff), var(--bk-brand)); color: var(--bk-brand-ink);
    box-shadow: 0 8px 20px color-mix(in srgb, var(--bk-brand) 32%, transparent), inset 0 1px 0 rgba(255, 255, 255, .22);
    transition: filter .15s ease, transform .1s ease, opacity .15s ease, box-shadow .2s ease;
}
.bk-btn.is-ghost, .bk-btn.is-quiet, .bk-btn:disabled { box-shadow: none; }
.bk-btn:hover { filter: brightness(1.06); }
.bk-btn:active { transform: scale(.985); }
.bk-btn:disabled { opacity: .55; cursor: not-allowed; }
.bk-btn.is-ghost { background: #fff; color: var(--bk-brand-text); border: 1.5px solid var(--bk-brand-line); }
.bk-btn.is-quiet { background: transparent; color: var(--bk-ink-2); font-weight: 600; font-size: 15px; min-height: 46px; }
.bk-btn.is-ok { background: var(--bk-ok); }

/* ---------- how it works (first screen) */
.bk-how3 { padding: 16px; }
.bk-how3 b { display: block; font-size: 13px; font-weight: 700; color: var(--bk-ink-3); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
.bk-how3 ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: 1fr; counter-reset: h; }
.bk-how3 li { counter-increment: h; display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 500; color: var(--bk-ink); }
.bk-how3 li .bk-how-ico {
    position: relative; width: 42px; height: 42px; border-radius: 13px; flex: none; display: grid; place-items: center; color: var(--bk-brand-text);
    background: linear-gradient(145deg, var(--bk-brand-soft), color-mix(in srgb, var(--bk-brand) 20%, #ffffff));
}
.bk-how3 li .bk-how-ico::after {
    content: counter(h); position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%;
    background: var(--bk-brand); color: var(--bk-brand-ink); font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff;
}
.bk-how3 li .bk-ico { width: 22px; height: 22px; }
@media (min-width: 600px) {
    .bk-how3 ol { grid-template-columns: repeat(3, 1fr); gap: 14px; }
    .bk-how3 li { flex-direction: column; text-align: center; align-items: center; }
}
.bk-btn .bk-ico { width: 20px; height: 20px; }
.bk-row { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 440px) { .bk-row { grid-template-columns: 1fr 1fr; } .bk-row > :only-child { grid-column: 1 / -1; } }
/* who made it: a quiet line at the foot of every screen of the page */
.bk-by {
    display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
    padding: 26px 16px calc(26px + env(safe-area-inset-bottom));
    color: var(--bk-ink-3); font-size: 13px;
}
.bk-by img { height: 26px; width: auto; display: block; }
.bk-by b { font-weight: 700; color: var(--bk-ink-2); }
/* the action bar is fixed over the page: leave room so the line is never under it */
body.has-bar .bk-by { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }

.bk-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(8px); border-top: 1px solid var(--bk-line);
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
}
.bk-bar-in { max-width: 720px; margin: 0 auto; }
.bk-spin {
    width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid color-mix(in srgb, currentColor 40%, transparent); border-top-color: currentColor;
    animation: bk-spin .8s linear infinite;
}
.bk-spin.is-dark { border-color: var(--bk-brand-line); border-top-color: var(--bk-brand); }
@keyframes bk-spin { to { transform: rotate(360deg); } }

.bk-alert {
    display: flex; gap: 10px; align-items: flex-start; border-radius: 12px; padding: 12px; font-size: 14px; font-weight: 500;
    background: var(--bk-bad-soft); color: var(--bk-bad); margin: 0 0 14px;
}
.bk-alert.is-warn { background: var(--bk-warn-soft); color: var(--bk-warn); }
/* "Try again" inside a warning, and the fault's own word under it (for the hospital's own people) */
.bk-inline-link {
    background: none; border: 0; padding: 6px 2px; margin: 0; font: inherit; font-weight: 700;
    color: inherit; text-decoration: underline; cursor: pointer; min-height: 32px;
}
.bk-inline-link:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; border-radius: 6px; }
.bk-code { display: block; margin-top: 2px; font-size: 12px; opacity: .75; }
.bk-alert .bk-ico { width: 20px; height: 20px; }
.bk-empty { text-align: center; color: var(--bk-ink-2); padding: 28px 12px; }
.bk-empty .bk-ico { width: 44px; height: 44px; color: #94a3b8; margin-bottom: 8px; }
.bk-skel { height: 72px; border-radius: 14px; background: linear-gradient(90deg, #eef2f6 25%, #f8fafc 37%, #eef2f6 63%); background-size: 400% 100%; animation: bk-skel 1.2s ease infinite; }
.bk-skel + .bk-skel { margin-top: 10px; }
@keyframes bk-skel { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* ---------- payment */
.bk-pay { text-align: center; }
.bk-count {
    display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 7px 14px;
    background: var(--bk-brand-soft); color: var(--bk-brand-text); font-weight: 600; font-size: 14px; margin-bottom: 14px;
}
.bk-count b { font-variant-numeric: tabular-nums; font-size: 17px; }
.bk-count.is-low { background: var(--bk-warn-soft); color: var(--bk-warn); }
.bk-count .bk-ico { width: 18px; height: 18px; }
.bk-qr {
    width: 100%; max-width: 300px; margin: 0 auto 14px; display: block; border-radius: 16px;
    border: 1.5px solid var(--bk-line); box-shadow: var(--bk-shadow); background: #fff;
}
.bk-how { text-align: left; background: #f8fafc; border-radius: 14px; padding: 14px; margin: 14px 0; }
.bk-how h3 { font-size: 15px; margin: 0 0 8px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.bk-how h3 .bk-ico { width: 20px; height: 20px; color: var(--bk-brand-text); }
.bk-how ol { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 8px; }
.bk-how li { counter-increment: s; display: flex; gap: 10px; font-size: 14px; color: var(--bk-ink); }
.bk-how li::before {
    content: counter(s); flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--bk-brand); color: var(--bk-brand-ink);
    font-size: 13px; font-weight: 700; display: grid; place-items: center;
}
.bk-wait { display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 600; color: var(--bk-ink); margin-top: 6px; }
.bk-wait-sub { font-size: 13px; color: var(--bk-ink-3); margin: 4px 0 14px; }
.bk-sim { margin-top: 16px; border: 1px dashed #f59e0b; border-radius: 12px; padding: 12px; background: var(--bk-warn-soft); }
.bk-sim b { display: block; font-size: 13px; color: var(--bk-warn); margin-bottom: 8px; }
.bk-sim div { display: grid; gap: 8px; grid-template-columns: repeat(3, 1fr); }
.bk-sim button { border: 1px solid #f59e0b; background: #fff; border-radius: 10px; min-height: 44px; font-size: 13px; font-weight: 600; color: var(--bk-warn); }

/* ---------- ticket */
.bk-done { text-align: center; }
.bk-tick {
    width: 68px; height: 68px; border-radius: 50%; background: var(--bk-ok); color: #fff; margin: 0 auto 12px;
    display: grid; place-items: center; animation: bk-pop .45s cubic-bezier(.2, 1.3, .4, 1);
}
.bk-tick .bk-ico { width: 36px; height: 36px; stroke-width: 2.6; }
.bk-tick.is-bad { background: #94a3b8; }
@keyframes bk-pop { 0% { transform: scale(.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.bk-ticket {
    margin: 16px 0; border-radius: 18px; background: #fff; border: 1.5px solid var(--bk-line); overflow: hidden; text-align: left;
    box-shadow: var(--bk-shadow);
}
.bk-ticket-top { position: relative; background: linear-gradient(180deg, var(--bk-brand-soft), color-mix(in srgb, var(--bk-brand) 16%, #ffffff)); padding: 16px; text-align: center; border-bottom: 2px dashed var(--bk-brand-line); }
.bk-ticket-top::before, .bk-ticket-top::after {
    content: ""; position: absolute; bottom: -12px; width: 22px; height: 22px; border-radius: 50%; background: var(--bk-card);
    border: 1.5px solid var(--bk-line); z-index: 1;
}
.bk-ticket-top::before { left: -12px; }
.bk-ticket-top::after { right: -12px; }
.bk-ticket-top span { display: block; font-size: 13px; font-weight: 600; color: var(--bk-brand-text); text-transform: uppercase; letter-spacing: .06em; }
.bk-ticket-top b { display: block; font-size: 52px; line-height: 1.1; font-weight: 800; letter-spacing: .04em; color: var(--bk-ink); font-variant-numeric: tabular-nums; }
.bk-ticket-body { padding: 4px 16px 12px; }
.bk-kv { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--bk-line); font-size: 15px; }
.bk-kv:last-child { border-bottom: 0; }
.bk-kv span { color: var(--bk-ink-3); flex: none; }
.bk-kv b { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.bk-ticket-qr { display: flex; align-items: center; gap: 14px; padding: 12px 16px 16px; border-top: 2px dashed var(--bk-line); }
.bk-ticket-qr canvas, .bk-ticket-qr img { width: 96px; height: 96px; flex: none; }
.bk-ticket-qr p { margin: 0; font-size: 13px; color: var(--bk-ink-2); }
.bk-paid { display: inline-flex; align-items: center; gap: 4px; background: var(--bk-ok-soft); color: var(--bk-ok); font-weight: 700; font-size: 13px; border-radius: 999px; padding: 3px 10px; }
.bk-paid .bk-ico { width: 14px; height: 14px; stroke-width: 2.6; }

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
:focus-visible { outline: 3px solid var(--bk-brand); outline-offset: 2px; }
@media print {
    .bk-head, .bk-bar, .bk-noprint { display: none !important; }
    .bk-main { margin-top: 0; }
    body.bk-body { background: #fff; }
}
