/*
 * Copyright © 2026 Jochen Dreser,
 * Hausärztliche Gemeinschaftspraxis in der Stadtgalerie Langenfeld.
 * Alle Rechte vorbehalten. Vervielfältigung, Weitergabe, Nutzung in anderen
 * Praxen oder Abänderung dieses Programms oder einzelner Bestandteile ist
 * ohne vorherige ausdrückliche schriftliche Zustimmung des Rechteinhabers untersagt.
 */

:root {
  --ink: #101d38;
  --muted: #5b6980;
  --primary: #294b82;
  --primary-dark: #06122c;
  --surface: #ffffff;
  --background: #f3f5fa;
  --line: #dce2ed;
  --mint: #e8eef8;
  --coral: #f26d5b;
  --coral-soft: #fff0ed;
  --blue: #5b7086;
  --blue-soft: #edf1f7;
  --green: #294b82;
  --green-soft: #e8eef8;
  --violet: #8b67c8;
  --violet-soft: #f3edff;
  --warning: #fff6d9;
  --shadow: 0 18px 55px rgba(20, 50, 58, .10);
  --keyboard-inset: 0px;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--background);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html {
  width: 100%; max-width: 100%; overflow-x: hidden; overscroll-behavior-x: none;
  scroll-behavior: smooth; touch-action: pan-y;
}
body {
  position: relative; width: 100%; min-width: 0; max-width: 100%; margin: 0;
  overflow-x: hidden; overscroll-behavior-x: none; background: var(--background);
  line-height: 1.55; touch-action: pan-y;
}
body.dialog-open { overflow: hidden; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
svg { width: 1.5em; height: 1.5em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.skip-link { position: fixed; top: -100px; left: 12px; z-index: 100; padding: 12px 16px; background: var(--ink); color: white; border-radius: 10px; }
.skip-link:focus { top: 12px; }

.app-header {
  position: sticky; top: 0; z-index: 30;
  display: flex; justify-content: space-between; align-items: center;
  min-height: 74px; padding: 10px max(4vw, 20px);
  background: rgba(255,255,255,.88); border-bottom: 1px solid rgba(20,50,58,.07);
  backdrop-filter: blur(18px);
}
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; line-height: 1.05; }
.brand-mark {
  display: grid; place-items: center; width: 48px; height: 48px; overflow: hidden; border-radius: 14px;
  color: var(--primary); background: linear-gradient(145deg, #fafbfe, #e8edf6); box-shadow: 0 8px 20px rgba(41,75,130,.15);
}
.brand-mark img { width: 45px; height: 43px; object-fit: contain; }
.brand-copy strong, .brand-copy small { display: block; }
.brand-copy strong { font-size: 1.04rem; letter-spacing: -.01em; }
.brand-copy small { margin-top: 4px; color: var(--primary); font-size: .78rem; font-weight: 900; letter-spacing: .02em; }
.header-actions { display: flex; gap: 10px; align-items: center; }
.install-button, .round-action {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  border: 0; border-radius: 14px; background: var(--mint); color: var(--primary); font-weight: 800; cursor: pointer; text-decoration: none;
}
.install-button { gap: 7px; padding: 9px 14px; }
.install-button svg { width: 19px; }
@media (display-mode: standalone), (display-mode: fullscreen), (display-mode: minimal-ui), (display-mode: window-controls-overlay) {
  #install-button, #install-list-button { display: none !important; }
}
.round-action { width: 44px; }

.practice-notice {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  width: 100%;
  max-width: 1050px;
  margin: 16px auto 0;
  padding: 15px 17px;
  border: 1px solid #cbd6ea;
  border-radius: 20px;
  background: #eef3fb;
  color: var(--primary-dark);
  box-shadow: 0 10px 28px rgba(6,18,44,.08);
}
.practice-notice[hidden] { display: none; }
.practice-notice-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 13px;
  background: white;
  color: var(--primary);
  font-weight: 950;
}
.practice-notice strong,
.practice-notice p { display: block; margin: 0; }
.practice-notice p { margin-top: 2px; color: #3b4c68; line-height: 1.42; }
.practice-notice.warning {
  border-color: #ead08a;
  background: #fff7df;
}
.practice-notice.warning .practice-notice-icon {
  color: #9a6500;
}
.practice-notice.critical {
  border-color: #efb3ad;
  background: #fff0ee;
}
.practice-notice.critical .practice-notice-icon {
  color: #b23a32;
}

main {
  width: min(100%, 1180px); max-width: 100%; margin: 0 auto;
  overflow-x: hidden; padding: 28px max(4vw, 20px) 115px; touch-action: pan-y;
}
#start { position: relative; overflow: clip; isolation: isolate; }
#start::before {
  content: ""; position: absolute; z-index: -1; width: 460px; height: 460px; top: -190px; right: -150px;
  border-radius: 50%; background: radial-gradient(circle, rgba(91,112,134,.15), transparent 68%);
}
.app-screen[hidden] { display: none; }
.app-screen { width: 100%; min-width: 0; max-width: 100%; }
.app-screen.active { animation: screen-in .22s ease-out; }
@keyframes screen-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

.welcome-card {
  position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr 230px; align-items: center;
  min-height: 252px; padding: clamp(30px, 5vw, 55px); border-radius: 34px;
  color: white; background:
    radial-gradient(circle at 78% 22%, rgba(255,255,255,.13), transparent 27%),
    linear-gradient(135deg, #06122c 0%, #18345f 55%, #5b7086 100%);
  box-shadow: 0 24px 65px rgba(6,18,44,.25);
}
.welcome-card-compact {
  grid-template-columns: minmax(0, 1fr) 175px;
  min-height: 190px;
  padding: clamp(24px, 3.6vw, 36px);
  cursor: pointer;
  background:
    radial-gradient(circle at 82% 18%, rgba(255,255,255,.16), transparent 24%),
    linear-gradient(135deg, #20365b 0%, #385b86 58%, #8090a3 100%);
  box-shadow: 0 16px 42px rgba(6,18,44,.15);
}
.welcome-card-compact:hover { transform: translateY(-1px); box-shadow: 0 18px 45px rgba(6,18,44,.18); }
.welcome-card-compact:focus-visible { outline: 4px solid rgba(41,75,130,.24); outline-offset: 3px; }
.welcome-card::before { content: ""; position: absolute; width: 260px; height: 260px; top: -140px; left: 38%; border-radius: 50%; border: 52px solid rgba(255,255,255,.05); }
.welcome-copy { position: relative; z-index: 1; max-width: 680px; }
.kicker { margin: 0 0 8px; color: var(--primary); font-size: .76rem; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.welcome-card .kicker { color: #bceee4; }
h1, h2, h3, p { overflow-wrap: break-word; }
h1 { margin: 0; font-size: clamp(2.05rem, 5vw, 4.4rem); line-height: 1.03; letter-spacing: -.045em; }
.welcome-card-compact h1 { font-size: clamp(1.9rem, 4vw, 3.15rem); }
.welcome-copy > p:not(.existing-patient-note) { max-width: 600px; margin: 18px 0 0; color: #e6ecf7; font-size: clamp(1.02rem, 1.6vw, 1.2rem); }
.welcome-card-compact .welcome-copy > p:not(.existing-patient-note) { margin-top: 10px; font-size: .98rem; }
.existing-patient-note {
  max-width: 690px; margin: 22px 0 0; padding: 13px 16px; border: 1px solid rgba(255,255,255,.22);
  border-radius: 15px; background: rgba(255,255,255,.11); color: #fff; font-size: .91rem; line-height: 1.45;
}
.welcome-card-compact .existing-patient-note {
  position: relative; z-index: 2; margin-top: 12px; padding: 9px 12px;
  background: rgba(255,255,255,.12); backdrop-filter: blur(1px);
}
.welcome-orbit { position: relative; width: 210px; height: 210px; justify-self: end; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; }
.welcome-orbit::before, .welcome-orbit::after { content: ""; position: absolute; inset: 28px; border: 1px solid rgba(255,255,255,.15); border-radius: 50%; }
.welcome-orbit::after { inset: 59px; }
.orbit-cross { position: absolute; inset: 67px; display: grid; place-items: center; border-radius: 28px; background: white; color: var(--primary); box-shadow: 0 16px 35px rgba(6,18,44,.24); }
.welcome-card-compact .welcome-orbit { width: 162px; height: 162px; opacity: .7; transform: translateY(8px); }
.welcome-card-compact .orbit-cross { inset: 51px; }
.welcome-card-compact .heartbeat-line { width: 78px; bottom: 36px; }
.aesculapian-symbol svg { width: 52px; height: 72px; overflow: visible; }
.aesculapian-symbol .staff { stroke-width: 6; }
.aesculapian-symbol .snake { stroke-width: 7; }
.aesculapian-symbol .snake-head { fill: currentColor; stroke: none; }
.orbit-dot { position: absolute; width: 17px; height: 17px; border-radius: 50%; background: #ffcc72; box-shadow: 0 0 0 6px rgba(255,204,114,.18); }
.orbit-dot.one { top: 18px; right: 27px; }
.orbit-dot.two { bottom: 22px; left: 11px; background: #ff8c7c; }
.heartbeat-line { position: absolute; right: 3px; bottom: 46px; width: 96px; color: rgba(255,255,255,.72); }
.heartbeat-line svg { width: 100%; height: auto; stroke-width: 2.2; }

.accessibility-toggle-card {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  max-width: 1050px; margin: 14px auto 0; padding: 12px 14px 12px 16px;
  border: 1px solid rgba(41,75,130,.16); border-radius: 18px;
  background: rgba(255,255,255,.78); color: var(--ink);
  box-shadow: 0 8px 24px rgba(20,50,58,.05);
}
.contrast-toggle-title { display: block; color: var(--ink); font-weight: 900; white-space: nowrap; }
.contrast-toggle {
  display: inline-flex; align-items: center; gap: 9px; flex: 0 0 auto;
  min-height: 40px; padding: 7px 10px; border: 0; border-radius: 999px;
  background: var(--mint); color: var(--primary); font-weight: 850; cursor: pointer;
}
.contrast-toggle-track {
  position: relative; width: 46px; height: 26px; border-radius: 999px;
  background: #cfd9e6; transition: background .18s;
}
.contrast-toggle-track span {
  position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(16,29,56,.22);
  transition: transform .18s;
}
.contrast-toggle[aria-pressed="true"] {
  background: #06122c; color: #fff;
}
.contrast-toggle[aria-pressed="true"] .contrast-toggle-track {
  background: #ffcc72;
}
.contrast-toggle[aria-pressed="true"] .contrast-toggle-track span {
  transform: translateX(20px);
}

body.high-contrast-mode {
  --ink: #000000;
  --muted: #1f2937;
  --primary: #002b78;
  --primary-dark: #000b24;
  --surface: #ffffff;
  --background: #ffffff;
  --line: #111827;
  --mint: #e6f0ff;
  --blue: #002b78;
  --blue-soft: #e6f0ff;
  --green: #002b78;
  --green-soft: #e6f0ff;
  font-size: 112%;
  letter-spacing: .002em;
}
body.high-contrast-mode .app-header,
body.high-contrast-mode .welcome-card,
body.high-contrast-mode .action-card,
body.high-contrast-mode .today-card,
body.high-contrast-mode .content-card,
body.high-contrast-mode .contact-card,
body.high-contrast-mode .settings-list > *,
body.high-contrast-mode .processing-banner,
body.high-contrast-mode .practice-notice,
body.high-contrast-mode .accessibility-toggle-card {
  border: 2px solid #111827;
  box-shadow: none;
}
body.high-contrast-mode .welcome-card {
  background: #002b78;
  color: #ffffff;
}
body.high-contrast-mode .welcome-copy > p:not(.existing-patient-note),
body.high-contrast-mode .existing-patient-note {
  color: #ffffff;
}
body.high-contrast-mode .existing-patient-note {
  background: rgba(255,255,255,.18);
  border-color: #ffffff;
}
body.high-contrast-mode .action-card,
body.high-contrast-mode .today-card,
body.high-contrast-mode .content-card,
body.high-contrast-mode .contact-card,
body.high-contrast-mode .settings-list > *,
body.high-contrast-mode .processing-banner,
body.high-contrast-mode .accessibility-toggle-card {
  background: #ffffff;
}
body.high-contrast-mode .action-copy small,
body.high-contrast-mode .processing-banner p,
body.high-contrast-mode .status-detail,
body.high-contrast-mode .content-card p,
body.high-contrast-mode .settings-list small,
body.high-contrast-mode .accessibility-toggle-card small {
  color: #111827;
}
body.high-contrast-mode .primary-button,
body.high-contrast-mode .secondary-button,
body.high-contrast-mode .bottom-nav,
body.high-contrast-mode .bottom-nav a.active {
  border: 2px solid #111827;
}
body.high-contrast-mode input,
body.high-contrast-mode textarea,
body.high-contrast-mode select {
  border: 2px solid #111827;
  background: #ffffff;
  color: #000000;
}

.processing-banner {
  display: flex; gap: 16px; align-items: flex-start; max-width: 1050px; margin: 20px auto 0; padding: 20px 23px;
  background: #eef2f9; border: 1px solid #ccd6e7; border-radius: 22px; box-shadow: 0 10px 30px rgba(32,53,91,.06);
}
.banner-icon { display: grid; place-items: center; flex: 0 0 auto; width: 43px; height: 43px; border-radius: 14px; background: white; color: var(--primary); }
.processing-banner p { margin: 4px 0 0; color: #43536d; }
.home-section { margin-top: clamp(42px, 6vw, 65px); }
.section-title-row { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 22px; }
.section-title-row h2, .today-card h2 { margin: 0; font-size: clamp(1.65rem, 3vw, 2.3rem); line-height: 1.1; }
.test-chip { padding: 7px 11px; border-radius: 999px; background: #e5eceb; color: var(--muted); font-size: .72rem; font-weight: 800; }

.action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.action-card {
  display: grid; grid-template-columns: 68px 1fr auto; align-items: center; gap: 18px; min-height: 126px; padding: 23px;
  width: 100%; min-width: 0; overflow: hidden;
  border: 0; border-radius: 22px; background: rgba(255,255,255,.96); text-align: left; cursor: pointer;
  box-shadow: 0 11px 34px rgba(20,50,58,.08); transition: transform .18s, box-shadow .18s, border-color .18s;
}
.action-card { text-decoration: none; }
.action-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.action-card:focus-visible, .settings-list a:focus-visible, .settings-list button:focus-visible, .bottom-nav a:focus-visible { outline: 4px solid rgba(41,75,130,.24); outline-offset: 2px; }
.action-icon { display: grid; place-items: center; width: 66px; height: 66px; border-radius: 21px; }
.action-icon svg { width: 31px; height: 31px; }
.action-card.coral .action-icon { color: var(--coral); background: var(--coral-soft); }
.action-card.blue .action-icon { color: var(--blue); background: var(--blue-soft); }
.action-card.green .action-icon { color: var(--primary); background: var(--mint); }
.action-card.violet .action-icon { color: var(--violet); background: var(--violet-soft); }
.action-card.appointment {
  grid-column: auto; grid-template-columns: 68px 1fr auto;
  color: var(--ink); background: rgba(255,255,255,.96);
  box-shadow: 0 11px 34px rgba(20,50,58,.08);
}
.action-card.appointment .action-icon { color: var(--blue); background: var(--blue-soft); box-shadow: none; }
.action-card.appointment .action-copy strong { color: var(--ink); }
.action-card.appointment .action-copy small { color: var(--muted); }
.action-card.appointment .action-arrow { color: #9aadaf; }
.action-copy { min-width: 0; }
.action-copy strong, .action-copy small { display: block; max-width: 100%; overflow-wrap: break-word; hyphens: auto; }
.action-copy strong { font-size: 1.08rem; line-height: 1.22; letter-spacing: -.01em; }
.action-copy small { margin-top: 5px; color: var(--muted); font-size: .89rem; }
.action-arrow { color: #9aadaf; font-size: 2rem; font-weight: 300; }

.today-card { margin-top: 22px; padding: 28px; border-radius: 28px; background: rgba(255,255,255,.96); border: 0; box-shadow: 0 12px 36px rgba(20,50,58,.07); }
.today-status { display: flex; gap: 15px; align-items: center; }
.status-pulse { flex: 0 0 auto; width: 14px; height: 14px; border-radius: 50%; background: #8a9a9d; box-shadow: 0 0 0 7px #e8eeee; transition: background .2s, box-shadow .2s; }
.today-status.open .status-pulse { background: #38a169; box-shadow: 0 0 0 7px #e3f5e9; }
.today-status.break .status-pulse { background: #e69424; box-shadow: 0 0 0 7px #fff0d6; }
.today-status.closed .status-pulse { background: #d34d45; box-shadow: 0 0 0 7px #fde7e5; }
.status-detail { margin: 6px 0 0; color: var(--muted); font-size: .9rem; }
.today-status.open .status-detail { color: #287947; }
.today-status.break .status-detail { color: #996116; }
.today-status.closed .status-detail { color: #a23c36; }
.today-status.special-closed + .hours-list { display: none; }
.hours-list { display: grid; grid-template-columns: .95fr 1.05fr; gap: 12px; margin: 25px 0; }
.hours-list div { padding: 17px 18px; border: 1px solid var(--line); border-radius: 18px; background: #fbfcfe; }
.hours-list .registration-time { border-color: #c5d4ea; background: #eef2f9; }
.hours-list .registration-time strong { color: var(--primary-dark); }
.hours-list span, .hours-list strong, .hours-list small { display: block; }
.hours-list span { color: var(--muted); font-size: .82rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.hours-list strong { margin-top: 7px; line-height: 1.32; }
.hours-list small { margin-top: 7px; color: var(--muted); line-height: 1.35; }
.primary-button, .secondary-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 12px 22px;
  border-radius: 17px;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.15;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}
.primary-button {
  border: 1px solid #163f70;
  background: linear-gradient(135deg, var(--primary) 0%, #173f73 100%);
  color: white;
  box-shadow: 0 12px 28px rgba(23, 63, 115, .18);
}
.primary-button:hover {
  background: linear-gradient(135deg, #173f73 0%, var(--primary-dark) 100%);
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(23, 63, 115, .23);
}
.secondary-button {
  border: 1px solid #c2d4df;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8fb 100%);
  color: var(--primary);
  box-shadow: 0 8px 20px rgba(27, 72, 112, .08);
}
.secondary-button:hover {
  border-color: #9fbdd1;
  background: linear-gradient(180deg, #f9fcff 0%, #edf5fb 100%);
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(27, 72, 112, .12);
}
.primary-button:active, .secondary-button:active { transform: translateY(0); box-shadow: 0 5px 14px rgba(27, 72, 112, .10); }
.primary-button:focus-visible, .secondary-button:focus-visible { outline: 3px solid rgba(29, 91, 143, .22); outline-offset: 2px; }
.primary-button svg { width: 20px; }
.wide { width: 100%; }

.care-section {
  margin-top: clamp(58px, 8vw, 90px); padding: clamp(24px, 4vw, 38px);
  border-top: 1px solid #cbd4e3; border-radius: 28px; background: #e9edf5;
}
.care-heading { max-width: 700px; margin-bottom: 20px; }
.care-heading h2 { margin: 0; font-size: clamp(1.45rem, 3vw, 2rem); }
.care-heading > p:last-child { margin: 8px 0 0; color: var(--muted); font-size: .92rem; }
.care-strip {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; overflow: visible; margin-top: 0;
  border: 0; border-radius: 0; background: transparent; box-shadow: none;
}
.care-strip > a { display: flex; gap: 14px; align-items: center; min-height: 105px; padding: 20px; border: 1px solid #d8deea; border-radius: 19px; background: rgba(255,255,255,.66); text-decoration: none; transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease; }
.care-strip > a:hover, .care-strip > a:focus-visible { transform: translateY(-2px); border-color: #b9c8dd; background: #ffffff; box-shadow: 0 12px 28px rgba(20,50,58,.08); outline: none; }
.care-icon { display: grid; place-items: center; flex: 0 0 auto; width: 48px; height: 48px; border-radius: 16px; background: var(--mint); color: var(--primary); }
.care-icon svg { width: 24px; }
.care-strip strong, .care-strip small { display: block; }
.care-strip small { margin-top: 3px; color: var(--muted); line-height: 1.35; }

.screen-heading { max-width: 760px; margin: 20px 0 35px; }
.screen-heading h1 { font-size: clamp(2.2rem, 5vw, 4.2rem); }
.screen-heading > p:last-child { margin: 14px 0 0; color: var(--muted); font-size: 1.08rem; }
.content-cards { display: grid; gap: 16px; margin-bottom: 20px; }
.content-card, .route-card { display: flex; min-width: 0; gap: 22px; padding: 26px; border: 1px solid var(--line); border-radius: 24px; background: white; }
.content-card > div, .route-card > div, .contact-body, .settings-list span { min-width: 0; }
.content-card h2, .route-card h2, .contact-body h2 { margin: 0 0 7px; font-size: 1.25rem; }
.content-card p, .route-card p { margin: 0; color: var(--muted); }
.content-card p { hyphens: manual; }
.content-card .compact-service-list { margin-top: 10px; color: var(--ink); font-weight: 800; line-height: 1.55; }
.content-icon { display: grid; place-items: center; flex: 0 0 auto; width: 54px; height: 54px; border-radius: 17px; }
.content-icon svg { width: 27px; }
.content-icon.teal { color: var(--primary); background: var(--mint); }
.content-icon.blue { color: var(--blue); background: var(--blue-soft); }
.content-icon.coral { color: var(--coral); background: var(--coral-soft); }
.content-icon.violet { color: var(--violet); background: var(--violet-soft); }

.contact-card { overflow: hidden; display: grid; grid-template-columns: .8fr 1.2fr; border: 1px solid var(--line); border-radius: 28px; background: white; }
.map-art { position: relative; min-height: 330px; background-color: #dfe5ef; background-image: linear-gradient(32deg, transparent 48%, rgba(255,255,255,.8) 49% 55%, transparent 56%), linear-gradient(120deg, transparent 35%, rgba(255,255,255,.7) 36% 42%, transparent 43%), radial-gradient(circle at 27% 28%, #bec9da 0 8%, transparent 8.5%), radial-gradient(circle at 75% 70%, #bec9da 0 10%, transparent 10.5%); }
.map-art::after {
  content: "Solinger Stra\00DF e 48";
  position: absolute;
  left: 26px;
  bottom: 24px;
  padding: 9px 12px;
  border: 1px solid rgba(255,255,255,.85);
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  color: var(--primary-dark);
  font-size: .82rem;
  font-weight: 850;
  backdrop-filter: blur(8px);
}
.map-pin { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 68px; height: 68px; transform: translate(-50%,-50%); border-radius: 24px 24px 24px 7px; background: var(--primary); color: white; box-shadow: 0 15px 35px rgba(41,75,130,.28); }
.map-pin svg { width: 34px; height: 34px; }
.contact-body { align-self: center; padding: 38px; }
.route-practice-name {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 1.08rem;
  font-weight: 850;
  line-height: 1.28;
  letter-spacing: .01em;
}
.contact-body address { margin: 20px 0; color: var(--muted); font-size: 1.08rem; font-style: normal; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.route-button { background: var(--primary-dark); }
.route-overview-card {
  border-color: #d5dfed;
  box-shadow: 0 22px 55px rgba(24, 42, 65, .10);
}
.route-overview-card .contact-body {
  display: grid;
  align-content: center;
  gap: 12px;
}
.route-overview-card address {
  margin-bottom: 2px;
  font-size: 1.05rem;
}
.route-hints {
  display: grid;
  gap: 10px;
  margin-top: 6px;
}
.legacy-route-hints { display: none !important; }
.route-hints p {
  position: relative;
  margin: 0;
  padding: 14px 15px 14px 45px;
  border: 1px solid #d9e3ef;
  border-radius: 15px;
  background: linear-gradient(135deg, #f7faff, #ffffff);
  color: #38495f;
  line-height: 1.42;
}
.route-hints p::before {
  content: "i";
  position: absolute;
  left: 14px;
  top: 14px;
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--primary-dark);
  font-size: .78rem;
  font-weight: 950;
}
.route-hints strong { color: var(--primary-dark); }
.route-card { margin-top: 18px; }
.route-card a { display: inline-block; margin-top: 12px; color: var(--primary); font-weight: 800; }

.settings-list { overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: white; }
.settings-list a, .settings-list button {
  display: grid; grid-template-columns: 50px 1fr auto; gap: 15px; align-items: center; width: 100%; min-height: 82px; padding: 14px 20px;
  border: 0; background: white; text-align: left; text-decoration: none; cursor: pointer;
}
.settings-list > * + * { border-top: 1px solid var(--line); }
.settings-list strong, .settings-list small { display: block; }
.settings-list small { margin-top: 3px; color: var(--muted); }
.settings-list b { color: #9aadaf; font-size: 1.7rem; }
.list-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; background: #edf3f2; color: var(--primary); font-size: 1.2rem; font-weight: 850; }
.emergency-icon { color: #b63e34; background: #fff0ed; }
.install-icon { color: var(--violet); background: var(--violet-soft); }
.profile-icon { color: var(--blue); background: var(--blue-soft); }
.feedback-icon { color: var(--blue); background: #eef6ff; }
.app-version-card {
  margin-top: 14px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.72);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: .86rem;
}
.app-version-card strong { color: var(--ink); font-size: .9rem; }
.prototype-note { margin-top: 20px; padding: 22px; border-radius: 20px; background: #eaf3f2; color: #476267; }
.prototype-note p { margin: 5px 0 0; }

.bottom-nav {
  position: fixed; z-index: 25; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(4, 1fr);
  width: min(620px, calc(100% - 24px)); min-height: 72px; padding: 7px; transform: translateX(-50%);
  border: 1px solid rgba(20,50,58,.08); border-radius: 25px; background: rgba(255,255,255,.94); box-shadow: 0 16px 50px rgba(20,50,58,.19); backdrop-filter: blur(22px);
}
.bottom-nav a { display: flex; min-width: 0; flex-direction: column; gap: 2px; align-items: center; justify-content: center; border-radius: 17px; color: #71868a; text-decoration: none; font-size: .72rem; font-weight: 750; }
.bottom-nav svg { width: 24px; height: 24px; }
.bottom-nav a.active { color: white; background: linear-gradient(145deg, #294b82, #06122c); box-shadow: 0 7px 18px rgba(6,18,44,.22); }

dialog { width: min(760px, 100%); max-height: min(900px, calc(100dvh - 24px)); padding: 0; overflow: hidden; border: 0; border-radius: 28px; box-shadow: 0 28px 100px rgba(10,37,42,.32); }
dialog::backdrop { background: rgba(10,37,42,.58); backdrop-filter: blur(6px); }
.dialog-shell { display: flex; flex-direction: column; max-height: min(900px, calc(100dvh - 24px)); background: white; }
.dialog-header { position: sticky; top: 0; z-index: 3; display: grid; grid-template-columns: 45px 1fr 45px; align-items: center; min-height: 65px; padding: 8px 15px; background: rgba(255,255,255,.95); border-bottom: 1px solid var(--line); text-align: center; backdrop-filter: blur(16px); }
.back-button { display: grid; place-items: center; width: 43px; height: 43px; padding: 0; border: 0; border-radius: 14px; background: #edf3f2; color: var(--ink); cursor: pointer; }
.back-button svg { width: 23px; }
#dialog-content { min-width: 0; overflow-x: hidden; overflow-y: auto; padding: 0 clamp(22px, 5vw, 48px) 40px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.form-intro { margin: 0 calc(clamp(22px, 5vw, 48px) * -1) 26px; padding: 34px clamp(22px, 5vw, 48px); }
.form-intro.coral { background: linear-gradient(135deg, #fff0ed, #fff8f5); }
.form-intro.blue { background: linear-gradient(135deg, #edf3ff, #f6f8ff); }
.form-intro.green { background: linear-gradient(135deg, #e8eef8, #f7f9fc); }
.form-intro.violet { background: linear-gradient(135deg, #f3edff, #faf7ff); }
.large-form-icon { display: grid; place-items: center; width: 62px; height: 62px; margin-bottom: 18px; border-radius: 20px; background: white; color: var(--primary); font-size: 1.7rem; font-weight: 900; box-shadow: 0 10px 25px rgba(20,50,58,.08); }
.form-intro.coral .large-form-icon { color: var(--coral); }
.form-intro.blue .large-form-icon { color: var(--blue); }
.form-intro.green .large-form-icon { color: var(--primary); }
.form-intro.violet .large-form-icon { color: var(--violet); }
.large-form-icon svg { width: 31px; height: 31px; }
.form-intro h2 { margin: 0; font-size: clamp(1.9rem, 5vw, 2.7rem); line-height: 1.07; }
.form-intro h2, .form-intro p, .timing-box, legend, label { overflow-wrap: break-word; hyphens: auto; }
.form-intro > p:last-child { margin: 10px 0 0; color: var(--muted); }
.timing-box, .info-box { display: flex; flex-direction: column; gap: 4px; margin: 0 0 25px; padding: 17px 19px; border-radius: 16px; background: var(--warning); border: 1px solid #eddda3; }
fieldset { margin: 28px 0 0; padding: 0; border: 0; }
legend { margin-bottom: 10px; font-size: 1.08rem; font-weight: 850; }
label { display: block; margin: 15px 0; font-weight: 750; font-size: .94rem; }
label small { color: var(--muted); font-weight: 500; }
input, textarea, select { display: block; width: 100%; min-height: 52px; margin-top: 7px; padding: 13px 14px; border: 1px solid #b9cbc9; border-radius: 13px; background: white; color: var(--ink); font-size: 16px; }
textarea { min-height: 110px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 4px solid rgba(41,75,130,.15); border-color: var(--primary); }
label.field-needs-attention { color: #8a3d00; }
input.field-needs-attention,
textarea.field-needs-attention,
select.field-needs-attention {
  border-color: #d98122;
  background: #fff8ed;
  box-shadow: 0 0 0 3px rgba(217,129,34,.13);
}
input.field-needs-attention:focus,
textarea.field-needs-attention:focus,
select.field-needs-attention:focus {
  outline-color: rgba(217,129,34,.22);
  border-color: #c56d12;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 15px; border-radius: 14px; background: #f4f7f7; font-weight: 550; }
.check input { flex: 0 0 auto; width: 22px; min-height: 22px; margin: 2px 0 0; }
.check.field-needs-attention {
  border: 1px solid #d98122;
  background: #fff8ed;
  box-shadow: 0 0 0 3px rgba(217,129,34,.10);
}
.form-actions { display: grid; grid-template-columns: .7fr 1.3fr; gap: 10px; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }
.test-label { margin: 13px 0 0; color: var(--muted); font-size: .8rem; text-align: center; }
.honeypot {
  position: absolute !important; width: 1px !important; height: 1px !important; margin: -1px !important;
  padding: 0 !important; overflow: hidden !important; clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important; border: 0 !important; white-space: nowrap !important;
}
button:disabled { cursor: wait; opacity: .65; }
input[type="date"] {
  text-align: left;
  -webkit-text-align: left;
  appearance: none;
  -webkit-appearance: none;
}
input[type="date"]::-webkit-date-and-time-value {
  display: block;
  width: 100%;
  margin: 0;
  text-align: left;
}
input[type="date"]::-webkit-datetime-edit,
input[type="date"]::-webkit-datetime-edit-fields-wrapper {
  text-align: left;
  justify-content: flex-start;
}
.profile-finished {
  background: #2f9d63 !important;
  color: white !important;
  border-color: #2f9d63 !important;
}
.success { padding: 45px 0 15px; text-align: center; }
.success-mark { display: grid; place-items: center; width: 76px; height: 76px; margin: 0 auto 20px; border-radius: 25px; background: var(--mint); color: var(--primary); font-size: 2.1rem; font-weight: 900; }
.success h2 { margin: 0; font-size: 2rem; }
.success p { color: var(--muted); }
.summary { margin: 22px 0; padding: 18px; border-radius: 16px; background: #f3f7f6; text-align: left; white-space: pre-wrap; }
.profile-view { padding-bottom: 10px; }
.profile-security {
  display: flex; gap: 13px; align-items: flex-start; margin: 20px 0; padding: 16px;
  border: 1px solid #cfe3df; border-radius: 16px; background: #f1f9f7; color: #365d5a;
}
.profile-security .list-icon { flex: 0 0 auto; }
.profile-security p { margin: 2px 0 0; font-size: .9rem; }
.profile-message { min-height: 24px; margin: 12px 0; color: var(--muted); font-size: .9rem; }
.profile-message.error { color: #a23c36; }
.profile-message.success { color: #287947; }
.profile-fill-panel {
  display: flex; gap: 13px; align-items: center; margin: 0 0 22px; padding: 15px;
  border: 1px solid #cddff8; border-radius: 16px; background: #f2f6ff;
}
.profile-fill-panel span { min-width: 0; }
.profile-fill-panel strong, .profile-fill-panel small { display: block; }
.profile-fill-panel small { margin-top: 3px; color: var(--muted); }
.profile-fill-button { flex: 0 0 auto; min-height: 42px; padding: 9px 13px; border: 0; border-radius: 13px; background: var(--blue); color: white; font-weight: 800; cursor: pointer; }
.profile-save-hint {
  display: grid; gap: 10px; margin: 0 0 20px; padding: 14px 15px;
  border: 1px solid #cddff8; border-radius: 16px; background: #f2f6ff;
}
.profile-save-hint strong, .profile-save-hint small { display: block; }
.profile-save-hint small { margin-top: 3px; color: var(--muted); }
.profile-save-link {
  justify-self: start; padding: 0; border: 0; background: transparent;
  color: var(--blue); font: 800 .95rem/1.35 inherit; text-decoration: underline;
  text-underline-offset: 3px; cursor: pointer;
}
.combined-order-card .action-copy strong { line-height: 1.22; }
.pdf-upload-fieldset { border-color: #c9d4e6; background: #f7f9fc; }
.pdf-only-note {
  display: grid; gap: 3px; margin-bottom: 16px; padding: 14px 15px;
  border: 1px solid #c8d3e5; border-radius: 14px; background: #e9eef8; color: #243c63;
}
.pdf-only-note span { color: #53647e; font-size: .88rem; }
.file-upload-label input[type="file"] {
  padding: 10px; border: 1px dashed #91a5c3; background: white; cursor: pointer;
}
.file-upload-label input[type="file"]::file-selector-button {
  margin-right: 12px; padding: 9px 12px; border: 0; border-radius: 10px;
  background: var(--primary); color: white; font-weight: 800; cursor: pointer;
}
.pdf-file-status { min-height: 22px; margin: 9px 0 0; color: var(--muted); font-size: .88rem; }
.pdf-file-status.valid { color: #245f49; }
.pdf-file-status.error { color: #a23c36; font-weight: 700; }
.message-counter {
  margin: -4px 0 8px;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 700;
  text-align: right;
}
.red-flag-warning {
  margin: 10px 0 0;
  padding: 13px 14px;
  border: 1px solid #e4a19c;
  border-radius: 14px;
  background: #fff0ee;
  color: #8c2b25;
  font-weight: 750;
  font-size: .9rem;
}
.order-group { display: grid; gap: 14px; }
.group-help { margin: -4px 0 0; color: var(--muted); font-size: .9rem; }
.order-items { display: grid; gap: 14px; }
.order-item {
  position: relative; display: grid; gap: 12px; padding: 16px;
  border: 1px solid var(--line); border-radius: 18px; background: #f8fafc;
}
.order-item-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.order-item-header strong { color: var(--primary-dark); }
.remove-order-item {
  border: 0; background: transparent; color: #8b2435;
  font: 700 14px/1.2 inherit; padding: 8px; cursor: pointer;
}
.order-group > .secondary-button { justify-self: start; }
.order-group > .order-start-button {
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 16px;
  border-color: #bdd8ea;
  background: linear-gradient(180deg, #f7fbff 0%, #eaf4fb 100%);
  color: var(--primary-dark);
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(31, 78, 121, .08);
}
.order-group > .order-start-button.field-needs-attention {
  border-color: #d98122;
  background: linear-gradient(180deg, #fffaf2 0%, #fff1dc 100%);
  color: #7a4100;
  box-shadow: 0 0 0 3px rgba(217,129,34,.13), 0 8px 20px rgba(31,78,121,.08);
}
.order-validation-message { margin: 0; }
.pzn-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: center;
  gap: 8px;
  margin-top: -7px;
}
.pzn-tools .secondary-button {
  width: 100%;
  min-height: 39px;
  padding: 8px 10px;
  border-radius: 14px;
  font-size: .84rem;
}
.pzn-scan-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-color: #b8d4e7;
  background: #eef7ff;
  color: var(--primary-dark);
}
.medication-ocr-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-color: #d9cbe9;
  background: #f8f4ff;
  color: #49306f;
}
.medication-ocr-button .ocr-inline-icon {
  background: #49306f;
}
.pzn-inline-camera {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 9px;
  background: var(--primary-dark);
  color: white;
  font-size: .95rem;
  line-height: 1;
}
.pzn-info-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 1px solid #bfd7e8;
  border-radius: 999px;
  background: #ffffff;
  color: var(--primary-dark);
  font-weight: 900;
  font-size: 1rem;
  box-shadow: 0 6px 16px rgba(33, 78, 127, .08);
  cursor: pointer;
}
.pzn-info-button:focus-visible {
  outline: 3px solid rgba(29, 91, 143, .24);
  outline-offset: 2px;
}
.pzn-info-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  max-height: none;
  height: 100dvh;
  margin: 0;
  border: 0;
  z-index: 2147483647;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(8, 23, 42, .52);
  backdrop-filter: blur(7px);
}
.pzn-info-overlay:not([open]) {
  display: none;
}
.pzn-info-overlay::backdrop {
  background: rgba(8, 23, 42, .52);
  backdrop-filter: blur(7px);
}
.pzn-info-card {
  position: relative;
  width: min(520px, calc(100vw - 28px));
  max-height: calc(100dvh - 36px);
  overflow: auto;
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid rgba(185, 210, 226, .95);
  border-radius: 26px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9fc 100%);
  box-shadow: 0 28px 80px rgba(8, 23, 42, .28);
}
.pzn-info-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 14px;
  background: #eaf2f7;
  color: var(--primary-dark);
  font-size: 1.4rem;
  font-weight: 800;
  cursor: pointer;
}
.pzn-info-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 17px;
  background: #e5f2fb;
  color: var(--primary-dark);
  font-weight: 950;
  box-shadow: inset 0 0 0 1px #c6ddeb;
}
.pzn-info-card h2 {
  margin: 0;
  padding-right: 42px;
  color: var(--primary-dark);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  line-height: 1.12;
}
.pzn-info-lead {
  margin: 0;
  padding: 13px 14px;
  border: 1px solid #cfe2ee;
  border-radius: 17px;
  background: #f2f8fc;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.4;
}
.pzn-example-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.pzn-example-grid figure {
  margin: 0;
  padding: 8px;
  border: 1px solid #d8e6ee;
  border-radius: 17px;
  background: rgba(255,255,255,.86);
}
.pzn-example-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  background: #eef4f8;
}
.pzn-example-grid figcaption {
  margin-top: 7px;
  color: var(--primary-dark);
  font-size: .78rem;
  font-weight: 850;
  line-height: 1.25;
  text-align: center;
}
.pzn-info-list {
  display: grid;
  gap: 10px;
}
.pzn-info-list p {
  margin: 0;
  padding: 12px 13px;
  border: 1px solid #dce8ef;
  border-radius: 16px;
  background: rgba(255,255,255,.78);
  color: var(--muted);
  line-height: 1.38;
}
.pzn-info-list strong { color: var(--primary-dark); }
.pzn-info-ok { width: 100%; }
.prescription-item {
  gap: 9px;
  padding: 14px;
}
.prescription-item label {
  margin: 8px 0;
}
.prescription-item input {
  min-height: 47px;
  margin-top: 5px;
  padding-top: 11px;
  padding-bottom: 11px;
}
.prescription-item .form-row {
  gap: 10px;
}
.prescription-item.has-valid-pzn .prescription-detail-row {
  display: none;
}
.pzn-list-wrap {
  display: grid;
  gap: 9px;
  margin: 2px 0;
  padding: 12px;
  border: 1px solid #b9d8cf;
  border-radius: 14px;
  background: #f1faf7;
}
.pzn-list-wrap[hidden] { display: none; }
.pzn-list {
  display: grid;
  gap: 8px;
}
.pzn-list-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}
.pzn-list-row span {
  color: #236344;
  font-weight: 900;
}
.pzn-list-row input {
  min-height: 42px;
  margin: 0;
  font-weight: 850;
  letter-spacing: .04em;
}
.pzn-list-row input.pzn-invalid {
  border-color: #c75141;
  background: #fff6f4;
}
.pzn-remove-button,
.pzn-add-button {
  min-height: 38px;
  border-radius: 12px;
  border: 1px solid #c9dfd8;
  background: #fff;
  color: #1e5d48;
  font-weight: 850;
  cursor: pointer;
}
.pzn-remove-button {
  color: #8b2435;
  border-color: #edc5c5;
}
.prescription-repeat-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: center;
  gap: 8px;
  margin: 3px 0 4px;
}
.prescription-repeat-box[hidden] { display: none; }
.prescription-repeat-box .check {
  margin: 0;
}
.pzn-repeat-info-button {
  width: 38px;
  min-height: 38px;
  border: 1px solid #bdd8ea;
  border-radius: 50%;
  background: #eef7ff;
  color: var(--primary-dark);
  font-weight: 950;
  cursor: pointer;
}
.prescription-item .check {
  margin: 4px 0 0;
  padding: 11px 12px;
  gap: 9px;
  align-items: center;
}
.prescription-item .check input {
  width: 20px;
  min-height: 20px;
  margin: 0;
}
.prescription-item .check span {
  line-height: 1.3;
}
.patient-fields-compact {
  margin-top: 18px;
}
.patient-fields-compact legend {
  margin-bottom: 8px;
}
.patient-fields-compact label {
  margin: 9px 0;
}
.patient-fields-compact input,
.patient-fields-compact select {
  min-height: 48px;
  margin-top: 5px;
  padding-top: 11px;
  padding-bottom: 11px;
}
.patient-fields-compact .form-row {
  gap: 10px;
}
@media (max-width: 430px) {
  .pzn-info-card {
    gap: 12px;
    padding: 20px;
  }
  .pzn-example-grid {
    grid-template-columns: 1fr;
  }
  .pzn-example-grid img {
    aspect-ratio: 16 / 9;
  }
}
.pzn-lookup-button {
  border-color: #c9dfd8;
  background: #effaf6;
  color: #1e5d48;
}
.pzn-scan-status {
  margin: -2px 0 0;
  padding: 10px 12px;
  border: 1px solid #b8d4e7;
  border-radius: 13px;
  background: #f3f9ff;
  color: var(--primary-dark);
  font-size: .88rem;
  font-weight: 750;
}
.form-completeness {
  margin: 4px 0 0; padding: 12px 14px; border-radius: 14px;
  background: #fff4df; color: #75500c; font-weight: 750; font-size: .92rem;
}
.form-completeness.complete { background: #e9f7ef; color: #236344; }
.order-item label small { color: var(--muted); font-weight: 600; }
.pzn-hint {
  margin: -2px 0 0;
  padding: 10px 12px;
  border: 1px solid #b9d8cf;
  border-radius: 13px;
  background: #edf8f4;
  color: #236344;
  font-size: .88rem;
  font-weight: 750;
}
.danger-button {
  display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 50px; margin-top: 12px;
  border: 1px solid #e3aaa6; border-radius: 16px; background: white; color: #a23c36; font-weight: 800; cursor: pointer;
}
.step-list { margin: 0; padding: 0; list-style: none; }
.insurance-primary {
  display: grid;
  gap: 12px;
  margin: 18px 0 20px;
  padding: 16px;
  border: 1px solid #dcd7f1;
  border-radius: 20px;
  background: #f8f6ff;
}
.insurance-app-hint { margin: 0; color: var(--muted); font-size: .9rem; }
.qr-zoom-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.insurance-qr-large { width: min(280px, 100%); justify-self: center; margin: 0; }
.insurance-qr-full { width: min(420px, 100%); margin-inline: auto; }
.step-list li { display: flex; gap: 15px; padding: 17px 0; }
.step-list li + li { border-top: 1px solid var(--line); }
.step-list li > span { display: grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; border-radius: 12px; background: var(--violet-soft); color: var(--violet); font-weight: 850; }
.step-list p { margin: 3px 0 0; color: var(--muted); }
.step-with-qr strong { overflow-wrap: anywhere; }
.kim-address { display: inline-block; overflow-wrap: anywhere; color: var(--ink); }
.pzn-scanner-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(4, 20, 38, .58);
  backdrop-filter: blur(5px);
}
.pzn-scanner-card {
  width: min(460px, calc(100vw - 28px));
  display: grid;
  gap: 11px;
  padding: 15px;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 26px 80px rgba(4, 20, 38, .28);
  border: 1px solid rgba(184, 212, 231, .9);
}
.pzn-scanner-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.pzn-scanner-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.pzn-camera-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 16px;
  background: #e7f2fb;
  color: var(--primary-dark);
  box-shadow: inset 0 0 0 1px #c9dfee;
  font-size: 1.12rem;
}
.pzn-scanner-header strong { display: block; color: var(--primary-dark); font-size: 1.02rem; line-height: 1.15; }
.pzn-scanner-title small { display: block; margin-top: 2px; color: var(--muted); font-size: .73rem; font-weight: 750; line-height: 1.22; }
.pzn-scanner-header button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 14px;
  padding: 8px 10px;
  background: #edf2f6;
  color: var(--primary-dark);
  font-weight: 850;
}
.pzn-scanner-header button span[aria-hidden="true"] { font-size: 1.15rem; line-height: 1; }
.pzn-scanner-card video {
  width: 100%;
  max-height: 58vh;
  border-radius: 18px;
  background: #0b1624;
  object-fit: cover;
}
.pzn-scanner-card p { margin: 0; font-weight: 750; color: var(--ink); font-size: .93rem; line-height: 1.35; }
.pzn-scanner-card small { color: var(--muted); line-height: 1.35; font-size: .82rem; }
.pzn-diagnostic {
  padding: 10px 12px;
  border: 1px solid #efd49c;
  border-radius: 14px;
  background: #fff8e8;
  color: #77520d;
  font-size: .86rem;
  font-weight: 750;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.pzn-photo-box {
  display: grid;
  gap: 8px;
}
.pzn-photo-button {
  width: 100%;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  text-align: left;
  border-color: #b8d4e7;
  background: linear-gradient(135deg, #eaf6ff 0%, #f7fbff 100%);
  color: var(--primary-dark);
  font-weight: 850;
  box-shadow: 0 10px 26px rgba(33, 78, 127, .10);
}
.pzn-photo-button-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  background: var(--primary-dark);
  color: white;
  font-size: 1.25rem;
}
.pzn-photo-button span:last-child { display: grid; gap: 2px; }
.pzn-photo-button strong { font-size: .98rem; }
.pzn-photo-button small { color: #45657d; font-size: .78rem; font-weight: 750; }
.ocr-scanner-card {
  width: min(620px, calc(100vw - 28px));
}
.ocr-warning {
  padding: 12px 14px;
  border: 1px solid #efd49c;
  border-radius: 15px;
  background: #fff8e8;
  color: #77520d;
}
.ocr-result-list {
  display: grid;
  gap: 12px;
  max-height: min(58vh, 540px);
  overflow: auto;
  padding-right: 2px;
}
.ocr-result-card {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 14px;
  border: 1px solid #cfe1ee;
  border-radius: 18px;
  background: #f8fbff;
}
.ocr-result-card.uncertain {
  border-color: #efd49c;
  background: #fffaf0;
}
.ocr-result-card legend {
  padding: 0 6px;
  color: var(--primary-dark);
  font-weight: 900;
}
.ocr-result-card label {
  display: grid;
  gap: 5px;
  font-weight: 800;
  color: var(--ink);
}
.ocr-result-card input {
  width: 100%;
}
.ocr-raw-text {
  padding: 9px 11px;
  border: 1px dashed #bfd4df;
  border-radius: 13px;
  background: #ffffff;
  color: #35566a;
  font-size: .86rem;
}
.ocr-raw-text summary {
  cursor: pointer;
  font-weight: 850;
}
.ocr-raw-text pre {
  margin: 8px 0 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: .78rem;
  color: #17384b;
}
.ocr-remove {
  justify-self: start;
  color: #8b2435;
}
.ocr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.ocr-actions button {
  flex: 1 1 180px;
}
.pzn-manual-box {
  display: grid;
  gap: 10px;
  margin-top: 2px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f7fafc;
}
.pzn-manual-box label {
  display: grid;
  gap: 7px;
  color: var(--primary-dark);
  font-weight: 850;
}
.pzn-manual-box input {
  min-height: 48px;
  border: 1px solid #bdd0df;
  border-radius: 14px;
  padding: 10px 12px;
  font: 800 1.1rem/1.2 inherit;
  letter-spacing: .08em;
  background: #fff;
  color: var(--ink);
}
.pzn-manual-box .primary-button {
  min-height: 46px;
}
.insurance-qr { width: min(230px, 100%); margin: 16px 0 3px; padding: 13px; border: 1px solid var(--line); border-radius: 18px; background: white; text-align: center; }
.insurance-qr img { display: block; width: 100%; height: auto; aspect-ratio: 1; }
.insurance-qr figcaption { margin-top: 8px; color: var(--muted); font-size: .8rem; line-height: 1.3; }
.info-box { display: block; margin-top: 18px; background: #eef5f4; border-color: #d6e6e3; }
.emergency-call { display: grid; grid-template-columns: 110px 1fr; gap: 18px; align-items: center; margin: 14px 0; padding: 22px; border-radius: 18px; color: white; text-decoration: none; }
.emergency-call.red { background: #c94a40; }
.emergency-call.dark { background: var(--ink); }
.emergency-call > strong { font-size: 1.65rem; }
.emergency-call span, .emergency-call b { display: block; }
.emergency-call span { color: rgba(255,255,255,.8); }
.emergency-call b { color: white; }

.install-help { position: fixed; inset: 0; z-index: 80; display: grid; place-items: end center; padding: 18px; background: rgba(10,37,42,.6); backdrop-filter: blur(6px); }
.install-help[hidden] { display: none; }
.install-help-card { position: relative; width: min(500px, 100%); padding: 30px; border-radius: 28px; background: white; box-shadow: var(--shadow); text-align: center; }
.install-help-card h2 { margin: 15px 0 10px; line-height: 1.15; }
.install-help-card p { color: var(--muted); }
.install-close { position: absolute; top: 13px; right: 13px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: #edf3f2; font-size: 1.5rem; cursor: pointer; }
.install-app-icon img { width: 78px; height: 78px; border-radius: 21px; box-shadow: 0 10px 25px rgba(20,50,58,.14); }
.offline-toast { position: fixed; z-index: 90; left: 50%; bottom: 105px; width: min(460px, calc(100% - 30px)); padding: 13px 16px; transform: translateX(-50%); border-radius: 14px; background: var(--ink); color: white; text-align: center; font-size: .9rem; box-shadow: var(--shadow); }

@media (min-width: 900px) {
  .bottom-nav { bottom: 18px; }
  .app-screen { min-height: calc(100vh - 210px); }
}

@media (max-width: 720px) {
  #start::before { display: none; }
  .app-header { min-height: 66px; padding: 8px 14px; }
  .brand-mark { width: 39px; height: 39px; border-radius: 13px; }
  .brand-mark img { width: 37px; height: 36px; }
  .brand-copy strong { max-width: 205px; font-size: .78rem; line-height: 1.05; }
  .brand-copy small { margin-top: 3px; font-size: .66rem; }
  main { padding: 16px 14px calc(104px + env(safe-area-inset-bottom)); }
  .welcome-card { grid-template-columns: 1fr; min-height: 174px; padding: 21px 18px 58px; border-radius: 25px; }
  .welcome-card h1 { max-width: 315px; font-size: clamp(1.65rem, 7.8vw, 2.32rem); }
  .welcome-card .welcome-copy > p:not(.existing-patient-note):not(.welcome-jump-hint) { max-width: 310px; margin-top: 9px; font-size: .94rem; line-height: 1.36; }
  .welcome-card-compact .existing-patient-note { max-width: 315px; margin-top: 11px; padding: 8px 10px; font-size: .82rem; line-height: 1.35; }
  .welcome-orbit { position: absolute; z-index: 0; right: -22px; top: auto; bottom: -58px; width: 145px; height: 145px; opacity: .5; transform: none; }
  .welcome-card-compact .welcome-orbit { width: 145px; height: 145px; transform: none; }
  .orbit-cross, .welcome-card-compact .orbit-cross { inset: 48px; border-radius: 19px; font-size: 2.45rem; }
  .aesculapian-symbol svg { width: 34px; height: 48px; }
  .processing-banner { margin-top: 14px; padding: 17px; border-radius: 18px; }
  .processing-banner p { font-size: .91rem; }
  .banner-icon { width: 40px; height: 40px; }
  .home-section { margin-top: 40px; }
  .action-grid { grid-template-columns: 1fr; gap: 12px; }
  .action-card {
    position: relative; display: grid; grid-template-columns: 58px minmax(0, 1fr) 24px; align-items: center;
    min-height: 104px; padding: 17px; border-radius: 22px; gap: 14px;
  }
  .action-card.appointment {
    grid-column: auto; grid-template-columns: 58px minmax(0, 1fr) 24px;
    min-height: 104px; padding: 17px;
  }
  .action-icon { width: 56px; height: 56px; border-radius: 18px; }
  .action-icon svg { width: 27px; }
  .action-copy { min-width: 0; }
  .action-copy strong { font-size: 1.04rem; line-height: 1.22; }
  .action-copy small { margin-top: 5px; font-size: .8rem; line-height: 1.35; }
  .combined-order-card { min-height: 116px; }
  .action-card .action-arrow { position: static; justify-self: end; }
  .today-card { padding: 21px; border-radius: 22px; }
  .care-section { margin-top: 58px; padding: 22px 16px; border-radius: 23px; }
  .care-strip { display: grid; grid-template-columns: 1fr; gap: 10px; overflow: visible; margin-right: 0; padding: 0; border-radius: 0; background: transparent; box-shadow: none; }
  .care-strip > a {
    width: 100%; min-width: 0; min-height: 92px; border-radius: 18px; background: rgba(255,255,255,.72); box-shadow: none;
  }
  .hours-list { grid-template-columns: 1fr; }
  .content-card, .route-card { padding: 20px; gap: 15px; border-radius: 20px; }
  .contact-card { grid-template-columns: 1fr; border-radius: 22px; }
  .map-art { min-height: 190px; }
  .contact-body { padding: 25px 21px; }
  .contact-actions { flex-direction: column; }
  .screen-heading { margin-top: 12px; }
  .screen-heading h1 { font-size: 2.55rem; }
  .bottom-nav {
    left: 0; right: 0; bottom: 0; width: 100%; min-height: calc(70px + env(safe-area-inset-bottom));
    padding: 7px 8px max(7px, env(safe-area-inset-bottom)); transform: none;
    border-right: 0; border-bottom: 0; border-left: 0; border-radius: 22px 22px 0 0;
  }
  .bottom-nav a { min-height: 55px; border-radius: 16px; }
  dialog { position: fixed; inset: 0; width: 100%; max-width: 100%; max-height: none; height: 100dvh; margin: 0; border-radius: 0; }
  dialog::backdrop { background: white; }
  .dialog-shell { width: 100%; height: 100%; max-height: none; min-height: 0; }
  .dialog-header { flex: 0 0 auto; min-height: 62px; padding-top: max(8px, env(safe-area-inset-top)); }
  #dialog-content {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0 18px calc(115px + env(safe-area-inset-bottom) + var(--keyboard-inset, 0px));
    scroll-padding-top: 18px;
    scroll-padding-bottom: calc(130px + env(safe-area-inset-bottom) + var(--keyboard-inset, 0px));
  }
  .form-intro { margin: 0 -18px 24px; padding: 27px 18px 25px; }
  .form-intro h2 { font-size: clamp(1.85rem, 8vw, 2.35rem); }
  .large-form-icon { width: 56px; height: 56px; margin-bottom: 15px; border-radius: 18px; }
  .timing-box, .info-box { padding: 15px 16px; }
  .step-list li > div { min-width: 0; }
}

@media (max-width: 430px) {
  .brand-copy strong { max-width: 174px; font-size: .7rem; }
  .brand-copy small { display: block; font-size: .61rem; }
  .section-title-row { align-items: center; }
  .section-title-row h2 { font-size: 1.75rem; }
  .processing-banner { gap: 12px; }
  .processing-banner b { display: inline; }
  .content-card { align-items: flex-start; }
  .content-icon { width: 48px; height: 48px; }
  .settings-list a, .settings-list button { grid-template-columns: 46px 1fr auto; padding: 13px 15px; }
  .form-row, .form-actions { grid-template-columns: 1fr; }
  .form-actions .secondary-button { order: 2; }
  .action-card { grid-template-columns: 54px minmax(0, 1fr) 20px; min-height: 100px; padding: 15px; gap: 12px; }
  .action-card.appointment { grid-template-columns: 54px minmax(0, 1fr) 20px; padding: 16px 15px; }
  .action-icon { width: 52px; height: 52px; border-radius: 17px; }
  .action-copy strong { font-size: 1rem; }
  .action-copy small { font-size: .77rem; }
  .emergency-call { grid-template-columns: 90px 1fr; padding: 18px; }
}

@media (max-width: 350px) {
  .action-card, .action-card.appointment { grid-template-columns: 48px minmax(0, 1fr) 18px; padding: 14px 12px; gap: 10px; }
  .action-icon { width: 47px; height: 47px; border-radius: 15px; }
  .action-icon svg { width: 24px; height: 24px; }
  .action-copy strong { font-size: .94rem; }
  .action-copy small { font-size: .73rem; }
}

@media (max-width: 720px) {
  .practice-notice {
    width: 100%;
    margin-top: 12px;
    padding: 13px;
    border-radius: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
