@font-face{font-family:'Inter';src:url('/smartkine/fonts/inter-400-900-latin.woff2') format('woff2');font-weight:400 900;font-style:normal;font-display:swap;}
@font-face{font-family:'Newsreader';src:url('/smartkine/fonts/newsreader-normal-300-800-latin.woff2') format('woff2');font-weight:300 800;font-style:normal;font-display:swap;}
@font-face{font-family:'Newsreader';src:url('/smartkine/fonts/newsreader-italic-300-800-latin.woff2') format('woff2');font-weight:300 800;font-style:italic;font-display:swap;}
@font-face{font-family:'IBM Plex Mono';src:url('/smartkine/fonts/ibm-plex-mono-400-latin.woff2') format('woff2');font-weight:400;font-style:normal;font-display:swap;}
@font-face{font-family:'IBM Plex Mono';src:url('/smartkine/fonts/ibm-plex-mono-500-latin.woff2') format('woff2');font-weight:500;font-style:normal;font-display:swap;}

:root{
  --paper:#FBF8FD;
  --paper-2:#F1E9F6;
  --ink:#291A33;
  --ink-soft:#64546D;
  --teal:#75408A;
  --teal-deep:#432052;
  --leaf:#E1B9EF;
  --gold:#8C4CA2;
  --line:rgba(41,26,51,.15);
  --mist:#F0E5F5;
  --shadow:0 20px 50px -25px rgba(67,32,82,.38);
  --shadow-sm:0 8px 24px -14px rgba(67,32,82,.42);
  --radius: 18px;
  --radius-sm: 12px;
  --kin-photo-tone: brightness(1.06) contrast(.95) saturate(.98);
  --kin-practitioner-photo-tone: brightness(1.04) contrast(.99) saturate(1.045);
  --selection-bar-height:0px;
}

*,*::before,*::after{box-sizing:border-box;}
[hidden]{display:none!important;}
html{scroll-behavior:smooth; scrollbar-width:thin; scrollbar-color:var(--teal) var(--paper-2);}
body{
  min-height:100vh; min-height:100dvh;
  margin:0; background:var(--paper); color:var(--ink);
  font-family:'Inter',sans-serif; font-size:18px; line-height:1.65;
  -webkit-font-smoothing:antialiased; overflow-x:hidden;
  padding-bottom:calc(40px + var(--selection-bar-height));
  transition:padding-bottom .2s ease;
}
body.dialog-open{ overflow:hidden; }
img{max-width:100%; display:block;}
a{color:inherit; text-decoration:none;}
.skip-link{
  position:fixed; z-index:1000; top:-80px; left:16px; padding:12px 18px;
  border-radius:10px; background:#fff; color:var(--ink); font-weight:700;
  box-shadow:0 8px 28px rgba(67,32,82,.16);
}
.skip-link:focus{top:16px;}
button{font-family:inherit; cursor:pointer; touch-action:manipulation;}
h1,h2,h3{margin:0; font-family:'Newsreader',serif; font-weight:560; letter-spacing:-0.01em;}
input,textarea,select{font-family:inherit; font-size:16px;}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{
  outline:3px solid rgba(117,64,138,.35);
  outline-offset:3px;
}
.visually-hidden{
  position:absolute!important; width:1px!important; height:1px!important;
  margin:-1px!important; padding:0!important; border:0!important;
  overflow:hidden!important; clip:rect(0 0 0 0)!important;
  clip-path:inset(50%)!important; white-space:nowrap!important;
}

.wrap{
  max-width:1120px; margin:0 auto;
  padding-right:max(clamp(18px,5vw,48px),env(safe-area-inset-right));
  padding-left:max(clamp(18px,5vw,48px),env(safe-area-inset-left));
}

.eyebrow{
  font-family:'IBM Plex Mono',monospace; font-size:12px; letter-spacing:.14em;
  text-transform:uppercase; color:var(--teal); display:block; margin-bottom:4px;
}
.req{ font-family:'IBM Plex Mono',monospace; font-size:10.5px; letter-spacing:.08em; text-transform:uppercase; color:var(--gold); margin-left:6px; }
.opt{ font-family:'IBM Plex Mono',monospace; font-size:10.5px; letter-spacing:.08em; text-transform:uppercase; color:var(--ink-soft); opacity:.7; margin-left:6px; }

/* ============ BUTTONS ============ */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  min-height:48px;
  padding:14px 26px; border-radius:100px; font-weight:600; font-size:14.5px;
  border:1px solid transparent; transition:transform .3s cubic-bezier(.2,.8,.2,1), background .25s, color .25s, border-color .25s;
  white-space:nowrap;
}
.btn:hover{ transform:translateY(-2px); }
.btn:disabled{ opacity:.5; cursor:not-allowed; transform:none; }
.btn-gold{ background:var(--gold); color:#fff; }
.btn-gold:hover{ background:#713B84; }
.btn-outline{ background:transparent; color:var(--ink); border-color:var(--line); }
.btn-outline:hover{ border-color:var(--teal); color:var(--teal); }
.btn-sm{ padding:9px 16px; font-size:12.8px; }

/* ============ HEADER ============ */
.app-header{
  background:linear-gradient(135deg,#351542 0%,#633075 58%,#87449A 100%); color:#F8ECFB;
  padding-top:calc(20px + env(safe-area-inset-top));
  padding-bottom:20px;
}
.header-inner{ display:flex; align-items:center; gap:20px; }
.brand{
  display:inline-flex; align-items:center; justify-content:flex-start;
  min-width:180px; min-height:64px; margin-right:19px; margin-left:-19px; padding:7px 12px;
  border-radius:14px; background:transparent; box-shadow:none;
  transition:background-color .2s ease;
}
.brand:hover{ background:rgba(255,255,255,.07); }
.app-header .brand:focus-visible{ outline-color:rgba(255,255,255,.92); }
.brand img{
  height:52px; width:52px; border-radius:50%;
  filter:none; box-shadow:0 7px 18px -9px rgba(0,0,0,.55);
}
.brand-identity{display:flex; min-width:0; flex-direction:column; justify-content:center; margin-left:10px; line-height:1;}
.brand-wordmark{color:#fff;font-family:'Inter',sans-serif;font-size:18px;font-weight:500;letter-spacing:.055em;white-space:nowrap;}
.brand-wordmark strong{font-weight:850;}
.brand-subtitle{margin-top:5px; color:#fff; font-family:'Inter',sans-serif; font-size:9.5px; font-weight:650; letter-spacing:.045em; line-height:1.2; white-space:nowrap; transform:translateX(1px);}
.header-titles .eyebrow{ color:var(--leaf); }
.header-titles h1{ font-size:clamp(24px,4vw,34px); color:#fff; }

/* ============ MAIN ============ */
.app-main{ margin-top:28px; display:flex; flex-direction:column; gap:22px; }

.panel{
  background:#fff; border:1px solid var(--line); border-radius:var(--radius);
  box-shadow:var(--shadow-sm); padding:clamp(20px,3vw,30px);
}

.field{ margin-bottom:22px; }
.field:focus{ outline:none; }
.field:last-child{ margin-bottom:0; }
.field-label{ display:block; font-weight:600; font-size:15px; color:var(--ink); margin-bottom:12px; }
.step-recap{
  width:100%; min-height:58px; display:none; align-items:center; justify-content:space-between; gap:14px;
  padding:10px 12px 10px 15px; border:1px solid rgba(117,64,138,.24); border-radius:14px;
  background:linear-gradient(135deg,#F7EFFA,#FFF); color:var(--ink); text-align:left;
  box-shadow:0 9px 24px -22px rgba(67,32,82,.7);
  transition:border-color .18s ease,background-color .18s ease,box-shadow .18s ease;
}
.step-recap:hover{
  border-color:rgba(117,64,138,.48); background:linear-gradient(135deg,#F3E6F7,#FFF);
  box-shadow:0 12px 26px -22px rgba(67,32,82,.82);
}
.step-recap > span:first-child{ min-width:0; display:grid; gap:2px; }
.step-recap small{ color:var(--ink-soft); font-size:11.5px; font-weight:650; line-height:1.2; }
.step-recap strong{ overflow:hidden; color:var(--teal-deep); font-size:14px; line-height:1.25; text-overflow:ellipsis; white-space:nowrap; }
.step-recap-action{
  flex:none; min-height:36px; display:inline-flex; align-items:center; padding:0 12px;
  border:1px solid rgba(117,64,138,.28); border-radius:999px; background:#fff;
  color:var(--teal-deep); font-size:12px; font-weight:750;
}
#region-field.is-complete{ margin-bottom:14px; }
#region-field.is-complete > :not(.step-recap){ display:none!important; }
#region-field.is-complete > .step-recap:not([hidden]){ display:flex; }

.home-mode-note{
  display:flex; align-items:center; gap:14px; margin-bottom:24px; padding:16px 18px;
  border:1px solid rgba(117,64,138,.24); border-radius:var(--radius-sm);
  background:linear-gradient(135deg,#F5ECF8,#FCF9FD); color:var(--ink);
}
.home-mode-note > span:last-child{display:grid; gap:1px;}
.home-mode-note strong{color:var(--teal-deep); font-size:15px;}
.home-mode-note small{color:var(--ink-soft); font-size:13px; line-height:1.45;}
.home-mode-icon{
  flex:none; display:grid; width:48px; height:48px; place-items:center; border-radius:50%;
  background:var(--teal-deep); box-shadow:inset 0 1px rgba(255,255,255,.16);
}
.home-mode-icon::before{
  content:""; width:25px; height:24px; background:#fff;
  clip-path:polygon(50% 0,100% 42%,88% 42%,88% 100%,60% 100%,60% 69%,40% 69%,40% 100%,12% 100%,12% 42%,0 42%);
}

/* ============ SEGMENTED (cabinet/domicile) ============ */
.segmented{ display:inline-flex; background:var(--paper-2); border-radius:100px; padding:5px; gap:4px; }
.seg{
  min-height:48px;
  border:none; background:transparent; color:var(--ink-soft); font-weight:600; font-size:14px;
  padding:10px 24px; border-radius:100px; transition:all .25s;
}
.seg.active{ background:#fff; color:var(--teal-deep); box-shadow:var(--shadow-sm); }

/* ============ LOCATION CARDS ============ */
.location-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:12px; }
.location-card{
  min-height:64px;
  text-align:left; border:1.5px solid var(--line); background:var(--paper); border-radius:var(--radius-sm);
  padding:16px 18px; transition:all .2s; display:flex; flex-direction:column; justify-content:center; gap:4px;
}
.location-card:hover{ border-color:var(--teal); transform:translateY(-2px); }
.location-card.active{ border-color:var(--teal); background:var(--mist); box-shadow:var(--shadow-sm); }
.location-card .loc-name{ font-weight:700; font-size:16px; color:var(--ink); }
.location-card .loc-addr{ font-size:12.5px; color:var(--ink-soft); }
.region-grid{ grid-template-columns:repeat(3,minmax(0,1fr)); }
.region-card{ min-height:72px; justify-content:center; }
.practitioner-grid{ grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); }
.practitioner-card{
  min-height:78px; flex-direction:row; align-items:center; justify-content:flex-start;
  gap:12px; padding:10px 16px 10px 10px;
}
.practitioner-card .practitioner-avatar{
  width:54px; height:54px; flex:0 0 54px; overflow:hidden; border-radius:50%;
  background:var(--paper-2); box-shadow:inset 0 0 0 1px rgba(117,64,138,.12);
}
.practitioner-card .practitioner-avatar img{
  width:100%; height:100%; object-fit:cover; object-position:center top;
  filter:var(--kin-practitioner-photo-tone);
}
.practitioner-card .practitioner-avatar img[src$="/ilia.webp"]{ filter:var(--kin-photo-tone); }
.practitioner-card .practitioner-copy{ display:grid; gap:3px; min-width:0; }
.practitioner-card .loc-name{ line-height:1.25; }
.practitioner-card .loc-addr{ line-height:1.35; }
.skeleton-row{ height:64px; border-radius:var(--radius-sm); background:linear-gradient(90deg,var(--paper-2),#fff,var(--paper-2)); background-size:200% 100%; animation:shimmer 1.4s infinite; }
@keyframes shimmer{ 0%{background-position:200% 0;} 100%{background-position:-200% 0;} }

/* ============ CHIPS ============ */
.chips{ display:flex; flex-wrap:wrap; gap:8px; }
.specialty-search-tools{
  display:flex; align-items:center; gap:12px;
  margin:-2px 0 15px;
}
.specialty-search-control{
  display:flex; flex:1; align-items:stretch; gap:8px;
  width:min(100%,500px); max-width:500px;
}
.specialty-search{
  position:relative; display:block; flex:1; min-width:0;
}
.specialty-search input{
  width:100%; min-height:46px;
  padding:10px 16px 10px 43px;
  border:1px solid rgba(117,64,138,.2); border-radius:999px; outline:none;
  background:rgba(250,247,239,.72); color:var(--ink);
  font-size:14px;
  transition:border-color .18s,box-shadow .18s,background-color .18s;
}
.specialty-search input::placeholder{ color:var(--ink-soft); opacity:.82; }
.specialty-search input::-webkit-search-cancel-button{ display:none; appearance:none; -webkit-appearance:none; }
.specialty-search input:hover{ border-color:rgba(117,64,138,.42); background:#fff; }
.specialty-search input:focus{
  border-color:var(--teal); background:#fff;
  box-shadow:0 0 0 3px rgba(117,64,138,.14);
}
.specialty-search-icon{
  position:absolute; z-index:1; top:50%; left:16px;
  width:17px; height:17px; color:var(--teal-deep);
  pointer-events:none; transform:translateY(-50%);
}
.specialty-search-icon::before{
  content:""; position:absolute; top:1px; left:1px;
  width:10px; height:10px; border:1.7px solid currentColor; border-radius:50%;
}
.specialty-search-icon::after{
  content:""; position:absolute; top:11px; left:11px;
  width:6px; height:1.7px; border-radius:999px;
  background:currentColor; transform:rotate(45deg); transform-origin:left center;
}
.specialty-search-clear{
  display:inline-grid; place-items:center; flex:none;
  width:46px; min-width:46px; min-height:46px; padding:0;
  border:1px solid rgba(117,64,138,.18); border-radius:50%;
  background:#fff; color:var(--teal-deep);
  font-size:23px; font-weight:400; line-height:1;
  transition:border-color .18s,background-color .18s,color .18s;
}
.specialty-search-clear:hover{
  border-color:var(--teal); background:var(--mist); color:var(--teal);
}
.specialty-search-result{
  flex:none; color:var(--ink-soft);
  font-size:11.5px; font-weight:650; line-height:1.35; white-space:nowrap;
}
.specialty-search-empty{
  display:flex; align-items:center; justify-content:space-between; gap:14px;
  margin:0 0 15px; padding:13px 15px;
  border:1px solid rgba(117,64,138,.18); border-radius:13px;
  background:rgba(244,235,248,.62); color:var(--ink-soft);
}
.specialty-search-empty p{ margin:0; font-size:13px; line-height:1.45; }
.specialty-search-empty button{
  flex:none; min-height:44px; padding:9px 14px;
  border:1px solid rgba(117,64,138,.22); border-radius:999px;
  background:#fff; color:var(--teal-deep);
  font-size:12.5px; font-weight:700;
}
.specialty-search-empty button:hover{ border-color:var(--teal); color:var(--teal); }
.specialty-list{
  display:flex; flex-direction:column; gap:14px;
}
.specialty-group{
  --specialty-group-accent:#75408A;
  --specialty-group-tint:rgba(241,229,246,.76);
  --specialty-group-tint-hover:rgba(233,214,241,.95);
  min-width:0;
  display:grid; gap:7px;
}
.specialty-group[data-specialty-group="kinesitherapie-reeducation"]{
  --specialty-group-accent:#75408A;
  --specialty-group-tint:rgba(241,229,246,.76);
  --specialty-group-tint-hover:rgba(233,214,241,.95);
}
.specialty-group[data-specialty-group="technologies-traitements"]{
  --specialty-group-accent:#99601f;
  --specialty-group-tint:rgba(255,241,222,.72);
  --specialty-group-tint-hover:rgba(252,232,205,.94);
}
.specialty-group[data-specialty-group="soins-bien-etre"]{
  --specialty-group-accent:#994D84;
  --specialty-group-tint:rgba(250,233,246,.82);
  --specialty-group-tint-hover:rgba(246,219,239,.97);
}
.specialty-group-heading{
  display:flex; align-items:center; gap:8px;
  margin:0;
  color:var(--specialty-group-accent);
  font-family:'Inter',sans-serif; font-size:11.5px; font-weight:750;
  line-height:1.3; letter-spacing:.065em; text-transform:uppercase;
}
.specialty-group-heading::before{
  content:""; flex:none; width:6px; height:6px; border-radius:50%;
  background:currentColor; opacity:.72;
}
.specialty-group-heading::after{
  content:""; flex:1; height:1px; min-width:24px;
  background:linear-gradient(90deg,currentColor,transparent); opacity:.2;
}
.specialty-group-list{
  display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:6px;
}
.specialty-option{
  position:relative;
  min-width:0; min-height:40px;
  display:grid; grid-template-columns:minmax(0,1fr) 40px; align-items:stretch; overflow:visible;
  border:1px solid color-mix(in srgb,var(--specialty-group-accent) 16%,transparent); border-radius:10px;
  background:var(--specialty-group-tint);
  box-shadow:none;
  transition:border-color .18s,background-color .18s,box-shadow .18s,transform .18s;
}
.specialty-option:focus-within,.specialty-option:hover{
  z-index:5;
  border-color:color-mix(in srgb,var(--specialty-group-accent) 46%,transparent);
  background:var(--specialty-group-tint-hover);
  box-shadow:0 9px 22px -19px rgba(67,32,82,.7);
  transform:translateY(-1px);
}
.specialty-option.is-active{
  border-color:var(--teal);
  background:#F6EDF9;
  box-shadow:0 10px 24px -20px rgba(67,32,82,.8);
}
.specialty-option.no-info{ grid-template-columns:minmax(0,1fr); }
.chip{
  min-height:44px;
  border:1.5px solid var(--line); background:#fff; color:var(--ink-soft);
  padding:8px 15px; border-radius:100px; font-size:13.3px; font-weight:500; transition:all .18s;
}
.chip:hover{ border-color:var(--teal); color:var(--teal); }
.chip.active{ background:var(--teal); border-color:var(--teal); color:#fff; }
.specialty-chip{
  width:100%; min-width:0; min-height:40px;
  border:0; border-radius:10px 0 0 10px; margin:0; padding:6px 9px 6px 11px;
  background:transparent; color:var(--ink-soft);
  font-size:12.25px; font-weight:650; line-height:1; text-align:left;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.specialty-chip:hover{ background:color-mix(in srgb,var(--specialty-group-tint-hover) 72%,#fff); }
.specialty-chip.active{
  border-color:transparent; background:var(--teal); color:#fff;
  box-shadow:4px 0 14px -12px rgba(67,32,82,.82);
}
.specialty-option.no-info .specialty-chip{ border-radius:10px; }
.specialty-info{
  position:relative; z-index:2;
  display:inline-flex; align-items:center; justify-content:center;
  width:40px; min-width:40px; height:auto; min-height:40px; align-self:stretch;
  padding:0; border-radius:0 10px 10px 0;
  border-left:1px solid color-mix(in srgb,var(--specialty-group-accent) 16%,transparent);
  color:var(--specialty-group-accent); background:transparent;
  line-height:1; touch-action:manipulation; -webkit-tap-highlight-color:transparent;
  transition:background-color .18s,color .18s;
}
.specialty-option.is-active .specialty-info{ background:rgba(117,64,138,.08); }
.specialty-info:hover,.specialty-info:focus-visible{ background:var(--mist); color:var(--teal); }
.specialty-info-glyph{
  display:inline-flex; align-items:center; justify-content:center;
  width:17px; height:17px; aspect-ratio:1 / 1; padding:0;
  border:1px solid currentColor; border-radius:50%;
  font-family:'Inter',sans-serif; font-size:10.5px; font-weight:750; font-style:normal;
  line-height:1; text-align:center;
}
.specialty-info-tooltip{
  position:absolute; z-index:20; right:0; bottom:calc(100% + 9px);
  width:max-content; max-width:calc(100vw - 24px); padding:6px 9px;
  border-radius:7px; background:var(--teal-deep); color:#fff;
  box-shadow:0 8px 22px -10px rgba(67,32,82,.72);
  font-family:'Inter',sans-serif; font-size:11.5px; font-weight:600;
  font-style:normal; line-height:1.2; letter-spacing:.01em; white-space:nowrap;
  opacity:0; pointer-events:none; transform:translateY(4px);
  transition:opacity .14s ease,transform .14s ease;
}
.specialty-info-tooltip::after{
  content:""; position:absolute; top:100%; right:16px;
  border:5px solid transparent; border-top-color:var(--teal-deep);
}
.specialty-info:hover .specialty-info-tooltip,
.specialty-info:focus-visible .specialty-info-tooltip{
  opacity:1; transform:translateY(0);
}
.chip.chip-therapist{
  display:inline-flex; align-items:center; gap:9px; min-height:46px; padding:6px 15px 6px 7px;
}
.chip.chip-all-therapists{
  border-color:rgba(117,64,138,.3); background:linear-gradient(135deg,#F4E9F8,#FFF);
  color:var(--teal-deep); font-weight:750;
}
.chip.chip-all-therapists:hover{ border-color:var(--teal); background:#F0E3F5; }
.chip.chip-all-therapists.active{ border-color:var(--teal); background:var(--teal); color:#fff; }
.therapist-all-icon{
  position:relative; width:32px; height:32px; flex:0 0 32px; border-radius:50%;
  background:rgba(117,64,138,.12); box-shadow:inset 0 0 0 1px rgba(117,64,138,.14);
}
.therapist-all-icon::before{
  content:""; position:absolute; top:7px; left:7px; width:7px; height:7px; border-radius:50%;
  background:currentColor; box-shadow:11px 2px 0 -1px currentColor;
}
.therapist-all-icon::after{
  content:""; position:absolute; right:6px; bottom:6px; left:6px; height:9px;
  border:2px solid currentColor; border-top-left-radius:10px; border-top-right-radius:10px; border-bottom:0;
  opacity:.78;
}
.chip.chip-all-therapists.active .therapist-all-icon{
  background:rgba(255,255,255,.14); box-shadow:inset 0 0 0 1px rgba(255,255,255,.2);
}
.chip .avatar{
  width:32px; height:32px; border:2px solid rgba(255,255,255,.8);
  border-radius:50%; object-fit:cover; object-position:center top; background:var(--paper-2);
  filter:var(--kin-practitioner-photo-tone);
}
.chip .avatar[src$="/ilia.webp"]{
  filter:var(--kin-photo-tone);
}

/* ============ CALENDAR ============ */
.calendar-head{ display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; margin-bottom:18px; }
.week-nav{ display:flex; align-items:center; gap:10px; }
.week-nav.is-loading{ pointer-events:none; }
.nav-btn{
  width:44px; height:44px; border-radius:50%; border:1px solid var(--line); background:#fff;
  font-size:20px; line-height:1; color:var(--teal-deep); transition:all .2s;
}
.nav-btn:hover:not(:disabled){ border-color:var(--teal); background:var(--mist); }
.nav-btn:disabled{ opacity:.35; cursor:not-allowed; }
.week-picker-anchor{ position:relative; min-width:180px; }
.week-label{ font-weight:600; font-size:15px; text-align:center; }
.week-label-button{
  width:100%; min-height:44px; display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:8px 14px; border:1px solid transparent; border-radius:999px; background:transparent;
  color:var(--ink); transition:border-color .18s,background .18s,color .18s;
}
.week-label-button:hover,.week-label-button[aria-expanded="true"]{
  border-color:var(--line); background:var(--mist); color:var(--teal-deep);
}
.week-label-button svg{
  width:17px; height:17px; flex:0 0 auto; fill:none; stroke:currentColor; stroke-width:1.7;
  stroke-linecap:round; stroke-linejoin:round;
}
.week-picker{
  position:absolute; z-index:40; top:calc(100% + 10px); left:50%; width:min(352px,calc(100vw - 20px));
  padding:10px; border:1px solid var(--line); border-radius:16px; background:#fff;
  box-shadow:0 20px 55px rgba(67,32,82,.2); transform:translateX(-50%);
}
.week-picker[hidden]{ display:none; }
.week-picker::before{
  content:""; position:absolute; top:-6px; left:50%; width:10px; height:10px; border-top:1px solid var(--line);
  border-left:1px solid var(--line); background:#fff; transform:translateX(-50%) rotate(45deg);
}
.week-picker-head{ display:grid; grid-template-columns:44px 1fr 44px; align-items:center; gap:8px; margin-bottom:8px; }
.week-picker-head strong{ color:var(--ink); font-size:14px; font-weight:700; text-align:center; text-transform:capitalize; }
.week-picker-head button{
  width:44px; height:44px; border:1px solid var(--line); border-radius:50%; background:var(--paper);
  color:var(--teal-deep); font-size:19px; line-height:1;
}
.week-picker-head button:hover:not(:disabled){ border-color:var(--teal); background:var(--mist); }
.week-picker-head button:disabled{ opacity:.3; cursor:not-allowed; }
.week-picker-weekdays,.week-picker-grid{ display:grid; grid-template-columns:repeat(7,1fr); gap:2px; }
.week-picker-weekdays{ margin-bottom:4px; }
.week-picker-weekdays span{
  padding:4px 0; color:var(--ink-soft); font-family:'IBM Plex Mono',monospace; font-size:9.5px;
  font-weight:600; text-align:center; text-transform:uppercase;
}
.week-picker-day,.week-picker-blank{ min-width:0; aspect-ratio:1; }
.week-picker-day{
  min-height:44px; display:inline-flex; align-items:center; justify-content:center; border:1px solid transparent; border-radius:10px;
  background:transparent; color:var(--ink); font-size:12.5px; font-weight:600; transition:border-color .16s,background .16s,color .16s;
}
.week-picker-day:hover:not(:disabled){ border-color:var(--teal); background:var(--mist); color:var(--teal-deep); }
.week-picker-day.is-current-week{ background:var(--mist); color:var(--teal-deep); }
.week-picker-day.is-today{ border-color:var(--teal); box-shadow:inset 0 0 0 1px var(--teal); }
.week-picker-day:disabled{ color:#b8b9b2; cursor:not-allowed; opacity:.58; }
.calendar-slot-summary{
  margin:-7px 0 14px; color:var(--teal-deep); font-size:13px; font-weight:650;
}

.calendar{
  display:grid; grid-template-columns:repeat(7,minmax(120px,1fr)); gap:10px;
  overflow-x:auto; padding:3px 3px 10px;
  scroll-snap-type:x proximity; overscroll-behavior-inline:contain;
  -webkit-overflow-scrolling:touch;
  transition:opacity .16s ease;
}
.calendar.is-loading{ opacity:.58; pointer-events:none; }
.day-col{ min-width:120px; }
.day-col{ scroll-snap-align:start; }
.day-head{ text-align:center; padding:8px 0; border-bottom:2px solid var(--line); margin-bottom:10px; }
.day-head .dow{ font-family:'IBM Plex Mono',monospace; font-size:11px; text-transform:uppercase; letter-spacing:.1em; color:var(--ink-soft); }
.day-head .dnum{ font-family:'Newsreader',serif; font-size:20px; color:var(--ink); }
.day-head.is-today .dnum{ color:var(--teal); }
.slots{ display:flex; flex-direction:column; gap:6px; }
.slot{
  min-height:44px;
  border:1px solid var(--line); background:var(--paper); border-radius:9px; padding:8px 6px;
  font-size:13px; font-weight:600; color:var(--teal-deep); text-align:center; transition:all .16s; line-height:1.2;
}
.slot:hover{ border-color:var(--teal); background:var(--mist); transform:translateY(-1px); }
.slot.active{ background:var(--teal); border-color:var(--teal); color:#fff; }
.slot .slot-th{ display:block; font-size:10.5px; font-weight:500; color:var(--ink-soft); margin-top:2px; }
.slot.active .slot-th{ color:#F7EAFB; }
.day-col.empty .slots::after{ content:"—"; color:var(--line); text-align:center; padding:10px 0; }
.calendar-empty{ text-align:center; color:var(--ink-soft); padding:24px; font-style:italic; }
.calendar-swipe-hint{ display:none; margin:0 0 10px; color:var(--ink-soft); font-size:12.5px; }

.hint{ text-align:center; color:var(--ink-soft); }
.hint p{ margin:0; }

/* ============ APP STATUS ============ */
.app-status{ background:#FCEBD8; border:1px solid var(--gold); color:#7a4a12; border-radius:var(--radius-sm); padding:14px 18px; font-size:14px; }
.app-status.error{ background:#fbe4e0; border-color:#d9765f; color:#8a2f1c; }
.app-status strong,.app-status span{ display:block; }

.prescription-reminder{
  position:relative; overflow:hidden; display:grid; gap:4px;
  margin:18px 0; padding:16px 18px 16px 20px;
  border:1px solid rgba(117,64,138,.3); border-radius:var(--radius-sm);
  background:linear-gradient(135deg,#F3E9F7,#FCF8FD); color:var(--ink);
}
.prescription-reminder::before{
  content:""; position:absolute; inset:0 auto 0 0; width:4px; background:var(--teal);
}
.prescription-reminder .prescription-kicker{
  font-family:'IBM Plex Mono',monospace; font-size:10px; letter-spacing:.12em;
  text-transform:uppercase; color:var(--teal);
}
.prescription-reminder strong{ font-size:14px; color:var(--teal-deep); }
.prescription-reminder p{ margin:0; font-size:12.8px; line-height:1.55; color:var(--ink-soft); }
.prescription-reminder-confirmation{ margin:18px 0 22px; text-align:left; }
.app-status strong{ margin-bottom:.4rem; font-family:'Newsreader',serif; font-size:1.25rem; }
.app-status .btn{ margin:1rem .6rem 0 0; }

/* ============ SELECTION BAR ============ */
.selection-bar{
  position:fixed; bottom:0; left:0; right:0; z-index:400;
  background:rgba(255,255,255,.92); backdrop-filter:blur(14px) saturate(160%); -webkit-backdrop-filter:blur(14px) saturate(160%);
  border-top:1px solid var(--line); box-shadow:0 -12px 40px -24px rgba(67,32,82,.5);
}
.selection-inner{
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  padding-top:14px;
  padding-bottom:max(14px,calc(8px + env(safe-area-inset-bottom)));
}
.selection-list{
  display:flex; flex-wrap:wrap; gap:8px; flex:1; min-width:0;
  max-height:min(24dvh,180px); overflow-y:auto; overscroll-behavior:contain;
}
.sel-pill{
  display:inline-flex; align-items:center; gap:8px; background:var(--mist); border:1px solid var(--line);
  border-radius:100px; padding:6px 8px 6px 14px; font-size:12.8px; font-weight:600; color:var(--teal-deep);
}
.sel-pill button{
  flex:none; width:44px; height:44px; margin:-6px -6px -6px 0;
  border:none; border-radius:50%; background:var(--teal-deep); color:#fff;
  font-size:20px; line-height:1; display:flex; align-items:center; justify-content:center;
}

/* ============ BOOKING PANEL ============ */
.overlay{ position:fixed; inset:0; background:rgba(46,20,56,.42); z-index:600; opacity:0; transition:opacity .3s; }
.overlay.show{ opacity:1; }
.booking-panel{
  position:fixed; top:0; right:0; bottom:auto; width:min(460px,100vw); height:100vh; height:100dvh; z-index:700;
  background:var(--paper); box-shadow:-20px 0 60px -30px rgba(67,32,82,.6);
  transform:translateX(100%); transition:transform .4s cubic-bezier(.2,.8,.2,1); overflow:hidden;
}
.booking-panel.open{ transform:translateX(0); }
.booking-scroll{
  height:100%; overflow-y:auto;
  padding-top:max(clamp(22px,4vw,34px),calc(18px + env(safe-area-inset-top)));
  padding-right:max(clamp(22px,4vw,34px),calc(18px + env(safe-area-inset-right)));
  padding-bottom:max(clamp(22px,4vw,34px),calc(18px + env(safe-area-inset-bottom)));
  padding-left:max(clamp(22px,4vw,34px),calc(18px + env(safe-area-inset-left)));
}
.panel-close{
  position:absolute;
  top:max(16px,calc(8px + env(safe-area-inset-top)));
  right:max(18px,calc(10px + env(safe-area-inset-right)));
  width:44px; height:44px; border-radius:50%; border:1px solid var(--line); background:#fff; font-size:22px; line-height:1; color:var(--ink-soft);
}
.panel-close:hover{ color:var(--ink); border-color:var(--teal); }
.booking-title{ font-size:24px; margin-bottom:16px; }
.booking-recap{ display:flex; flex-direction:column; gap:8px; margin-bottom:24px; }
.recap-item{ background:#fff; border:1px solid var(--line); border-radius:var(--radius-sm); padding:12px 14px; font-size:13.5px; }
.recap-item .r-when{ font-weight:700; color:var(--teal-deep); }
.recap-item .r-meta{ color:var(--ink-soft); font-size:12.5px; }

.booking-step{ margin-bottom:22px; }

input[type=text],input[type=email],input[type=tel],textarea{
  min-height:44px;
  width:100%; border:1.5px solid var(--line); border-radius:10px; padding:11px 13px; background:#fff; color:var(--ink); transition:border-color .2s;
}
input:focus,textarea:focus{ outline:none; border-color:var(--teal); }
input.invalid,input[aria-invalid="true"],textarea[aria-invalid="true"]{ border-color:#d9765f; }
.form-grid{ display:flex; flex-direction:column; gap:14px; }
.form-row label{ display:block; font-size:14px; font-weight:600; color:var(--ink-soft); margin-bottom:5px; }
.form-row-split{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.form-address-group{
  min-width:0; margin:0; padding:16px; border:1px solid rgba(117,64,138,.24);
  border-radius:var(--radius-sm); background:rgba(244,235,248,.72);
}
.form-address-group legend{ padding:0 6px; color:var(--teal-deep); font-size:13px; font-weight:750; }
.form-address-group .form-row + .form-row{ margin-top:12px; }
.form-help{ margin:5px 0 0; color:var(--ink-soft); font-size:13px; line-height:1.55; }
.form-address-group > .form-help{ margin:-1px 0 12px; }
.form-help a,.booking-legal a{ color:var(--teal-deep); font-weight:650; text-decoration:underline; text-underline-offset:3px; }
.patient-form.hidden-form{ display:none; }

.booking-documents{
  margin-top:2px; padding:16px; border:1px solid rgba(117,64,138,.24);
  border-radius:var(--radius-sm); background:rgba(244,235,248,.72);
}
.booking-documents-heading{ display:flex; align-items:center; justify-content:space-between; gap:12px; }
.booking-documents-label{ color:var(--teal-deep); font-size:13px; font-weight:750; }
.booking-documents-label span{ color:var(--ink-soft); font-weight:500; }
.booking-documents-count{
  flex:none; min-width:48px; border-radius:999px; padding:4px 9px;
  background:#fff; color:var(--teal-deep); font-size:11.5px; font-weight:750; text-align:center;
}
.visually-hidden-file{
  position:absolute!important; width:1px!important; height:1px!important; overflow:hidden!important;
  clip:rect(0 0 0 0)!important; clip-path:inset(50%)!important; white-space:nowrap!important;
}
.booking-documents .document-picker{
  display:flex; min-height:44px; align-items:center; justify-content:center; gap:9px;
  margin:12px 0 0; border:1px dashed rgba(117,64,138,.48); border-radius:11px; padding:9px 13px;
  background:#fff; color:var(--teal-deep); font-size:13px; font-weight:700; cursor:pointer;
  transition:border-color .18s,background-color .18s,box-shadow .18s;
}
.booking-documents .document-picker:hover{ border-color:var(--teal); background:#FCF8FD; }
.visually-hidden-file:focus-visible + .document-picker{
  outline:3px solid rgba(117,64,138,.24); outline-offset:3px; border-color:var(--teal);
}
.document-picker-icon{
  display:inline-flex; width:24px; height:24px; align-items:center; justify-content:center;
  border-radius:50%; background:var(--teal-deep); color:#fff; font-size:18px; font-weight:500; line-height:1;
}
.document-error{
  margin:9px 0 0; border-radius:9px; padding:9px 11px; background:#fbe4e0;
  color:#8a2f1c; font-size:11.5px; line-height:1.45;
}
.document-list{ display:flex; flex-direction:column; gap:7px; margin:10px 0 0; padding:0; list-style:none; }
.document-item{
  display:flex; min-width:0; align-items:center; justify-content:space-between; gap:10px;
  border:1px solid var(--line); border-radius:10px; padding:7px 7px 7px 11px; background:#fff;
}
.document-item-details{ display:flex; min-width:0; flex-direction:column; gap:1px; }
.document-item-name{
  overflow:hidden; color:var(--ink); font-size:12px; font-weight:650; text-overflow:ellipsis; white-space:nowrap;
}
.document-item-size{ color:var(--ink-soft); font-size:10.5px; }
.document-remove{
  flex:none; display:inline-flex; width:44px; height:44px; align-items:center; justify-content:center;
  border:0; border-radius:50%; background:var(--mist); color:var(--teal-deep);
  font-size:20px; line-height:1; cursor:pointer;
}
.document-remove:hover{ background:#E9D8F0; }
.document-remove:focus-visible{ outline:3px solid rgba(117,64,138,.24); outline-offset:2px; }
.document-privacy{ margin-top:9px; }

.booking-error{ background:#fbe4e0; border:1px solid #d9765f; color:#8a2f1c; border-radius:10px; padding:12px 14px; font-size:13.5px; margin-bottom:16px; }

.cancel-policy{ border:1.5px solid var(--gold); background:#FCF6E9; border-radius:var(--radius-sm); padding:16px 18px; margin-bottom:18px; }
.cancel-policy-text{ margin:0 0 12px; font-size:13px; line-height:1.55; color:var(--ink); }
.cancel-policy-details{ margin:0 0 15px; }
.cancel-policy-details summary{ width:fit-content; max-width:100%; min-height:44px; display:inline-flex; align-items:center; gap:8px; padding:7px 11px 7px 8px; border:1px solid rgba(117,64,138,.4); border-radius:999px; background:#F1E4F6; color:var(--teal-deep); box-shadow:0 8px 22px -18px rgba(67,32,82,.72); cursor:pointer; font-size:13px; font-weight:700; line-height:1.25; list-style:none; transition:background-color .16s,border-color .16s,box-shadow .16s; }
.cancel-policy-details summary::-webkit-details-marker{ display:none; }
.cancel-policy-details summary:hover{ border-color:rgba(117,64,138,.72); background:#E7D3EE; box-shadow:0 11px 26px -18px rgba(67,32,82,.84); }
.cancel-policy-details summary:focus-visible{ outline:3px solid rgba(117,64,138,.24); outline-offset:3px; }
.cancel-policy-info,.cancel-policy-toggle{ flex:none; display:inline-flex; align-items:center; justify-content:center; border-radius:50%; }
.cancel-policy-info{ width:23px; height:23px; background:var(--teal); color:#fff; font-family:Georgia,serif; font-size:13px; font-weight:700; font-style:italic; }
.cancel-policy-toggle{ position:relative; width:18px; height:18px; margin-left:2px; font-size:0; font-weight:500; transition:transform .18s; }
.cancel-policy-toggle::before,.cancel-policy-toggle::after{ position:absolute; top:50%; left:50%; width:10px; height:1.5px; border-radius:999px; background:currentColor; content:""; transform:translate(-50%,-50%); }
.cancel-policy-toggle::after{ transform:translate(-50%,-50%) rotate(90deg); }
.cancel-policy-details[open] .cancel-policy-toggle{ transform:rotate(45deg); }
.cancel-policy-details-body{ margin-top:10px; padding:14px 15px; border:1px solid rgba(117,64,138,.22); border-radius:12px; background:rgba(252,249,253,.98); color:var(--ink-soft); font-size:12.5px; line-height:1.65; }
.cancel-policy-details-body strong{ color:var(--ink); }
.cancel-policy-check{ display:flex; min-height:44px; align-items:flex-start; gap:10px; font-size:13px; font-weight:600; color:var(--ink); cursor:pointer; }
.cancel-policy-check input{ margin-top:3px; width:16px; height:16px; accent-color:var(--teal); flex-shrink:0; cursor:pointer; }

.booking-policy-overview{
  display:block;
  border-color:rgba(117,64,138,.22); padding:20px clamp(20px,3vw,28px);
  background:linear-gradient(135deg,#F8F0FB 0%,#FFF 72%);
}
.booking-policy-copy h2{ font-size:clamp(20px,3vw,25px); }
.booking-policy-copy p{ max-width:720px; margin:5px 0 0; color:var(--ink-soft); font-size:13px; line-height:1.55; }
.booking-policy-details{ width:100%; margin:16px 0 0; }
.booking-policy-details .cancel-policy-details-body{ max-width:820px; }

.booking-confirm{ width:100%; }
.booking-legal{ font-size:13px; line-height:1.5; color:var(--ink-soft); text-align:center; margin:12px 0 0; }

/* ============ CONFIRMATION ============ */
.confirmation{
  position:fixed; inset:0; z-index:800; display:flex; align-items:center; justify-content:center;
  padding-top:max(20px,env(safe-area-inset-top));
  padding-right:max(20px,env(safe-area-inset-right));
  padding-bottom:max(20px,env(safe-area-inset-bottom));
  padding-left:max(20px,env(safe-area-inset-left));
  opacity:0; pointer-events:none; transition:opacity .3s;
}
.confirmation.show{ opacity:1; pointer-events:auto; }
.confirmation-card{
  width:100%; max-width:440px; max-height:100%; overflow-y:auto; overscroll-behavior:contain;
  border-radius:var(--radius); padding:36px 32px; background:#fff; box-shadow:var(--shadow); text-align:center;
}
.confirm-icon{ width:64px; height:64px; border-radius:50%; background:var(--mist); color:var(--teal); font-size:34px; display:flex; align-items:center; justify-content:center; margin:0 auto 18px; }
.confirm-icon.warn{ background:#FCEBD8; color:var(--gold); }
.confirmation-card h2{ font-size:24px; margin-bottom:14px; }
.confirm-body{ text-align:left; display:flex; flex-direction:column; gap:8px; margin-bottom:24px; font-size:14px; }
.confirm-body .c-slot{ background:var(--paper); border:1px solid var(--line); border-radius:10px; padding:10px 13px; }
.confirm-body .c-slot.failed{ background:#fbe4e0; border-color:#d9765f; }
.confirm-documents-status{
  margin:-8px 0 22px; border:1px solid var(--line); border-radius:12px; padding:13px 14px;
  background:#fff; color:var(--ink); text-align:left;
}
.confirm-documents-status.sent{ border-color:rgba(117,64,138,.36); background:rgba(244,235,248,.82); }
.confirm-documents-status.failed{ border-color:#d9765f; background:#fbe4e0; color:#762a1a; }
.confirm-documents-status.sending{ border-color:rgba(117,64,138,.3); background:var(--mist); }
.confirm-documents-status strong{ display:block; font-size:13.5px; }
.confirm-documents-status p{ margin:5px 0 0; font-size:12px; line-height:1.5; }
.confirm-documents-status .btn{ width:100%; margin-top:11px; }

/* ============ FOOTER ============ */
.app-footer{ margin-top:40px; border-top:1px solid var(--line); }
.footer-inner{
  display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px 18px;
  padding-top:20px; padding-bottom:max(20px,env(safe-area-inset-bottom));
  font-size:12.8px; color:var(--ink-soft);
}
.footer-legal{ display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:4px 16px; }
.footer-legal a,.powered a{ display:inline-flex; min-height:44px; align-items:center; }
.powered a{ color:var(--teal); font-weight:600; }

/* ============ RESPONSIVE ============ */
@media (max-width:640px){
  .header-inner{ gap:14px; }
  .segmented{ width:100%; }
  .seg{ flex:1; padding-right:14px; padding-left:14px; }
  .cancel-policy-details summary{ width:100%; justify-content:flex-start; }
  .cancel-policy-toggle{ margin-left:auto; }
  .brand{ min-width:176px; min-height:54px; margin-right:8px; margin-left:-8px; padding:6px 8px; }
  .brand img{ width:42px; height:42px; }
  .brand-identity{ margin-left:8px; }
  .brand-wordmark{ font-size:15px; }
  .brand-subtitle{ margin-top:4px; font-size:8.5px; }
  .region-grid,.location-grid{ grid-template-columns:1fr; }
  .specialty-search-tools{ display:grid; gap:7px; margin-bottom:13px; }
  .specialty-search-control{ width:100%; max-width:none; }
  .specialty-search input{ min-height:48px; font-size:16px; }
  .specialty-search-clear{ width:48px; min-width:48px; min-height:48px; }
  .specialty-search-result{ padding-left:3px; white-space:normal; }
  .specialty-search-empty{ align-items:stretch; flex-direction:column; gap:10px; }
  .specialty-search-empty button{ width:100%; }
  .specialty-option{ width:100%; min-height:44px; grid-template-columns:minmax(0,1fr) 44px; }
  .specialty-list{ gap:18px; }
  .specialty-group-list{ grid-template-columns:1fr; gap:7px; }
  .specialty-group-heading{ font-size:11.5px; letter-spacing:.055em; }
  .specialty-chip{ flex:1; min-height:44px; font-size:14px; text-align:left; white-space:nowrap; }
  .field.is-complete{ margin-bottom:12px; }
  .field.is-complete > :not(.step-recap){ display:none!important; }
  .field.is-complete > .step-recap:not([hidden]){ display:flex; }
  .specialty-info{ width:44px; min-width:44px; min-height:44px; }
  .calendar{
    grid-template-columns:repeat(7,minmax(clamp(112px,36vw,148px),1fr));
    margin-right:-4px; margin-left:-4px;
  }
  .day-col{ min-width:clamp(112px,36vw,148px); }
  .calendar-swipe-hint{ display:block; }
  .calendar-head{ align-items:stretch; }
  .week-nav{ width:100%; justify-content:space-between; }
  .week-picker-anchor{ min-width:0; flex:1; }
  .week-label{ min-width:0; }
  .field,.calendar-panel{ scroll-margin-top:16px; }
  .week-picker{ max-width:352px; }
  .calendar-head > .btn{ width:100%; }
  .selection-inner{ flex-direction:column; align-items:stretch; }
  .selection-inner .btn{ width:100%; }
  .form-row-split{ grid-template-columns:1fr; }
  .booking-documents{ padding:14px; }
  .booking-title{ padding-right:48px; }
  .footer-inner{ flex-direction:column; align-items:flex-start; }
  .footer-legal{ justify-content:flex-start; }
}

@media (max-width:520px){
  .header-inner{ flex-direction:column; align-items:flex-start; gap:8px; }
  .brand{ min-width:0; margin-right:0; }
  .header-titles h1{ font-size:25px; }
  .home-mode-note{ align-items:flex-start; padding:14px; }
}

.chip .avatar[src$="/amory.webp"]{
  transform:scale(1.055);
  transform-origin:center 22%;
}

@media (prefers-reduced-motion:reduce){
  html{ scroll-behavior:auto; }
  *,*::before,*::after{
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
    transition-duration:.01ms!important;
  }
}
