/* Physio Center Gjilan
   One page built around the 3D figure: pale water blue behind it, navy type,
   white surfaces, walnut wood. Coral = pain, teal = relief (as on the figure). */

/* ---------- tokens ---------- */
:root {
  --navy: #0e1a33;
  --muted: #47586f;
  --blue: #0f5c85;
  --blue-deep: #0b4462;
  --aqua: #2bc0d0;
  --teal: #1f9fb5;
  --coral: #b53a1e;
  --walnut: #4b3022;
  --oak: #d9b18a;
  --wood: #f6eee5;
  --sky: #e8f2f6;
  --sky-deep: #d4e7ef;
  --white: #fff;
  --line: rgba(14, 26, 51, .12);

  --font: Manrope, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: max(clamp(16px, 5vw, 80px), calc((100vw - 1360px) / 2));
  --radius: 26px;
  --pill: 999px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --shadow: 0 18px 50px -24px rgba(15, 66, 98, .35);
  color-scheme: only light;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--sky); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
html:has(dialog[open]) { overflow: hidden; }
body {
  margin: 0;
  color: var(--navy);
  font: 500 1rem/1.55 var(--font);
  background: linear-gradient(180deg, var(--sky) 0, var(--sky-deep) 100vh, var(--sky) 100%);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; text-wrap: balance; }
h1 em, h2 em { font-style: normal; color: var(--blue); }
p, figure, dl, dd, ul { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
::selection { background: var(--blue); color: var(--white); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.skip { position: fixed; left: 12px; top: -80px; z-index: 40; padding: 12px 18px; border-radius: var(--pill); background: var(--navy); color: var(--white); }
.skip:focus { top: 12px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 26px;
  border: 0; border-radius: var(--pill);
  background: var(--navy); color: var(--white);
  font-weight: 700; font-size: .95rem; text-decoration: none;
  transition: background .25s, transform .25s var(--ease);
}
.btn:hover { background: var(--blue); transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-sm { min-height: 44px; padding: 0 20px; font-size: .9rem; }
.btn-light { background: var(--white); color: var(--navy); }
.btn-light:hover { background: var(--oak); }
.btn-wide { width: 100%; }
.round {
  display: inline-grid; place-items: center; flex: none;
  width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--line); border-radius: 50%; background: var(--white);
  transition: background .2s, color .2s;
}
.round:hover { background: var(--navy); color: var(--white); }
.round svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- backdrop and figure ---------- */
.backdrop { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.halo {
  position: absolute; left: 70%; top: 48%;
  width: 110vmin; height: 110vmin; transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--white) 0, rgba(255, 255, 255, .75) 26%, rgba(255, 255, 255, 0) 62%);
}
.word {
  position: absolute; left: 0; right: 0; bottom: 5vh;
  text-align: center; text-transform: uppercase; white-space: nowrap;
  font-size: 16.5vw; font-weight: 800; line-height: .8; letter-spacing: -.055em;
  color: rgba(10, 62, 92, .4); /* see-through blue: shows on light, and on Samsung's dark repaint */
  opacity: 0; transform: translateY(60px);
  transition: opacity .6s, transform .9s var(--ease);
}
.word.on { opacity: 1; transform: none; }

#stage { position: fixed; inset: 0; z-index: 1; display: block; width: 100%; height: 100%; pointer-events: none; opacity: 0; }
.js:not(.gl-ready) #stage { opacity: 0 !important; }
.gl-ready #stage { animation: stage-in 1.2s var(--ease) backwards; }
@keyframes stage-in { from { filter: blur(10px); } to { filter: none; } }

/* ---------- navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--gutter);
  transition: background .3s, box-shadow .3s;
}
.nav.solid { background: rgba(255, 255, 255, .92); box-shadow: 0 1px 0 var(--line); backdrop-filter: blur(14px); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 42px; height: 42px; border-radius: 50%; }
.brand b { display: block; font-size: 1rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.brand small { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.nav-links { display: flex; gap: 2px; padding: 4px; border-radius: var(--pill); background: rgba(255, 255, 255, .75); backdrop-filter: blur(14px); box-shadow: var(--shadow); }
.nav-links > * {
  display: inline-flex; align-items: center; height: 40px; padding: 0 18px;
  border: 0; border-radius: var(--pill); background: transparent;
  font-size: .9rem; font-weight: 700; text-decoration: none;
  transition: background .2s;
}
.nav-links > *:hover { background: var(--sky); }
.nav-end { display: flex; align-items: center; gap: 8px; }
.nav .short { display: none; }
.menu { display: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: var(--white); box-shadow: var(--shadow); }
.menu i { display: block; width: 18px; height: 2px; margin: 5px auto; border-radius: 2px; background: var(--navy); transition: transform .3s var(--ease); }
.menu[aria-expanded="true"] i:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu[aria-expanded="true"] i:last-child { transform: translateY(-3.5px) rotate(-45deg); }
.sheet { position: fixed; top: 72px; right: 12px; z-index: 25; display: grid; width: min(280px, calc(100vw - 24px)); padding: 8px; border-radius: 22px; background: var(--white); box-shadow: var(--shadow); }
.sheet > * { display: flex; align-items: center; min-height: 48px; padding: 0 16px; border: 0; border-radius: 14px; background: transparent; font-weight: 700; text-decoration: none; }
.sheet > *:hover { background: var(--sky); }
.sheet .sheet-tel { color: var(--blue); }

/* ---------- story ---------- */
.story { position: relative; z-index: 2; display: grid; }
.pin, .track { grid-area: 1 / 1; }
.pin { position: sticky; top: 0; align-self: start; z-index: 1; height: 100vh; height: 100dvh; pointer-events: none; }
.step { height: 75vh; height: 75svh; }
.step[data-ch="0"] { height: 100vh; height: 100svh; }
.step[data-ch="6"] { height: 125vh; height: 125svh; }

.panel {
  position: absolute; left: var(--gutter); top: 50%;
  width: min(480px, 42vw);
  opacity: 0; visibility: hidden;
  transform: translateY(calc(-50% + 34px));
  transition: opacity .35s, transform .7s var(--ease), visibility 0s .35s;
}
.panel.on { opacity: 1; visibility: visible; transform: translateY(-50%); pointer-events: auto; transition: opacity .5s .08s, transform .8s var(--ease), visibility 0s; }

.kicker { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); }
.kicker .n { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--navy); color: var(--white); letter-spacing: 0; transition: background .3s; }
.panel.healing .kicker .n { background: var(--blue); }

.panel h1 { font-size: clamp(2.5rem, 5.1vw, 4.8rem); line-height: 1; letter-spacing: -.045em; }
.panel h2 { font-size: clamp(1.9rem, 3.1vw, 2.9rem); }
.desc { max-width: 44ch; margin-top: 14px; color: var(--muted); }

.ask { margin: 30px 0 12px; font-size: 1.2rem; font-weight: 800; }
.picks { display: flex; flex-wrap: wrap; gap: 8px; }
.picks button { height: 46px; padding: 0 20px; border: 0; border-radius: var(--pill); background: var(--white); box-shadow: var(--shadow); font-weight: 700; font-size: .92rem; transition: background .2s, color .2s, transform .25s var(--ease); }
.picks button:hover { background: var(--navy); color: var(--white); transform: translateY(-3px); }
.hint { margin-top: 18px; font-size: .85rem; color: var(--muted); }

.phase { display: flex; align-items: center; gap: 12px; margin: 20px 0 8px; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.phase span:first-child { color: var(--coral); }
.phase span:last-child { color: var(--muted); transition: color .3s; }
.panel.healing .phase span:last-child { color: var(--blue); }
.phase i { flex: 1; height: 6px; overflow: hidden; border-radius: var(--pill); background: rgba(14, 26, 51, .1); }
.phase b { display: block; width: 100%; height: 100%; background: linear-gradient(90deg, #e8563a, var(--teal) 75%); transform: scaleX(0); transform-origin: 0 50%; }

.tx details { margin-top: 8px; border-radius: 18px; background: rgba(255, 255, 255, .82); box-shadow: 0 10px 30px -22px rgba(15, 66, 98, .5); }
.tx summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 50px; padding: 8px 18px; list-style: none; font-weight: 700; font-size: .96rem; cursor: pointer; border-radius: 18px; }
.tx summary::-webkit-details-marker { display: none; }
.tx summary::after { content: '+'; flex: none; font-size: 1.3rem; font-weight: 500; color: var(--blue); }
.tx details[open] summary::after { content: '–'; }
.tx p { padding: 0 18px 14px; font-size: .9rem; color: var(--muted); }
.panel > .btn { margin-top: 18px; }

.sub { margin: 22px 0 10px; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.rec { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.rec button { display: block; width: 100%; padding: 5px 5px 9px; border: 0; border-radius: 18px; background: var(--white); box-shadow: var(--shadow); text-align: center; transition: transform .3s var(--ease); }
.rec button:hover { transform: translateY(-5px); }
.rec img { width: 100%; aspect-ratio: 1; margin-bottom: 7px; border-radius: 14px; object-fit: cover; }
.rec b { display: block; font-size: .8rem; line-height: 1.25; }
.rec small { display: block; font-size: .72rem; color: var(--muted); }

.rail {
  position: absolute; left: var(--gutter); bottom: 20px;
  display: flex; gap: 2px; padding: 5px;
  border-radius: var(--pill); background: rgba(255, 255, 255, .88); box-shadow: var(--shadow); backdrop-filter: blur(14px);
  pointer-events: auto;
}
.rail button { display: flex; align-items: center; justify-content: center; min-width: 44px; height: 42px; padding: 0 10px; border: 0; border-radius: var(--pill); background: transparent; transition: background .3s, color .3s; }
.rail button:hover { background: var(--sky); }
.rail i { font-style: normal; font-size: .75rem; font-weight: 800; }
.rail span { display: inline-block; max-width: 0; overflow: hidden; white-space: nowrap; font-size: .85rem; font-weight: 700; opacity: 0; transition: max-width .45s var(--ease), opacity .3s, margin .45s var(--ease); }
.rail button[aria-current] { background: var(--navy); color: var(--white); }
.rail button[aria-current] i { color: var(--aqua); }
.rail button[aria-current] span { max-width: 130px; margin-left: 8px; opacity: 1; }

/* ---------- one-screen sections after the story ---------- */
.screen { position: relative; z-index: 3; display: flex; flex-direction: column; justify-content: center; min-height: 100vh; min-height: 100svh; padding: 92px 0 32px; }
.screen-head { margin-bottom: 28px; }
.screen-head .kicker { margin-bottom: 10px; }
.screen-head h2 { font-size: clamp(2rem, 4.2vw, 3.5rem); letter-spacing: -.045em; }

/* diplomas hung on a walnut slat wall, as at the centre */
.wall { border-radius: 40px 40px 0 0; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .035) 0 2px, transparent 2px 34px), linear-gradient(180deg, #553728, #382318); color: var(--white); box-shadow: 0 -30px 60px -40px rgba(15, 66, 98, .45); }
.wall .kicker { color: var(--oak); }
.wall .screen-head > p:last-child { margin-top: 10px; color: #e6d6c8; }
.certs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2vw, 28px); }
.cert { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 0; border: 0; background: none; color: inherit; text-align: left; }
.frame { display: block; margin-bottom: 12px; padding: 10px; border: 3px solid var(--oak); border-radius: 12px; background: var(--white); box-shadow: 0 26px 40px -22px rgba(0, 0, 0, .75); transition: transform .4s var(--ease); }
.cert:hover .frame { transform: translateY(-8px); }
.frame img { width: 100%; height: min(42vh, 380px); object-fit: contain; }
.cert b { font-size: .95rem; line-height: 1.3; }
.cert .who { font-size: .86rem; font-weight: 800; color: var(--oak); }
.cert small { font-size: .78rem; color: #dccabb; }
.wall :focus-visible { outline-color: var(--white); }

.place { background: var(--wood); }
.place .kicker { color: var(--walnut); }
.head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.mosaic { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 12px; height: min(580px, calc(100vh - 250px)); min-height: 360px; }
.shot { position: relative; overflow: hidden; min-width: 0; min-height: 0; padding: 0; border: 0; border-radius: 22px; background: var(--sky-deep); }
.shot-big { grid-column: span 2; grid-row: span 2; }
.shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.shot-team img { object-position: 50% 12%; }
.shot:hover img { transform: scale(1.06); }
.shot span { position: absolute; left: 10px; bottom: 10px; max-width: calc(100% - 20px); padding: 7px 14px; border-radius: var(--pill); background: rgba(255, 255, 255, .94); font-size: .82rem; font-weight: 800; text-align: left; }

/* ---------- visit: exactly one screen ---------- */
.visit { position: relative; z-index: 3; display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; padding: 92px 0 14px; border-radius: 40px 40px 0 0; background: var(--white); box-shadow: 0 -30px 60px -40px rgba(15, 66, 98, .4); }
.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.visit-grid { flex: 1; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 72px); align-content: center; }

.info { align-self: center; min-width: 0; }
.info h2 { font-size: clamp(2.2rem, 4.2vw, 3.7rem); letter-spacing: -.045em; }
.facts { margin: 26px 0; }
.facts > div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.facts dt { padding-top: 3px; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--walnut); }
.facts dd { font-weight: 700; }
.facts small { display: block; font-size: .82rem; font-weight: 500; color: var(--muted); }
.facts a { display: block; width: fit-content; max-width: 100%; padding: 2px 0; overflow-wrap: anywhere; text-decoration: none; text-underline-offset: .2em; }
.facts a:hover { color: var(--blue); text-decoration: underline; }
.facts .mail { font-size: .88rem; font-weight: 600; color: var(--blue); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-line { background: transparent; color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-line:hover { background: var(--sky); }

.side { display: flex; flex-direction: column; gap: 12px; min-width: 0; height: min(600px, calc(100vh - 170px)); min-height: 380px; align-self: center; }
.map { position: relative; flex: 1; min-height: 0; overflow: hidden; border-radius: var(--radius); background: var(--sky); }
.map img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.map:hover img { transform: scale(1.05); }
.map span { position: absolute; left: 14px; bottom: 14px; display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: var(--pill); background: var(--white); box-shadow: var(--shadow); font-size: .9rem; font-weight: 800; }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; padding-top: 14px; font-size: .78rem; color: var(--muted); }
.social { display: flex; gap: 18px; }
.social a { font-weight: 700; }

/* ---------- dialogs ---------- */
dialog { padding: 0 24px 24px; border: 0; border-radius: 30px; background: var(--white); color: var(--navy); box-shadow: 0 40px 100px -30px rgba(5, 20, 40, .55); overscroll-behavior: contain; }
dialog::backdrop { background: rgba(9, 22, 44, .55); backdrop-filter: blur(6px); }
dialog[open] { animation: pop .45s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(28px) scale(.98); } to { opacity: 1; transform: none; } }
.modal { width: min(900px, calc(100vw - 20px)); max-width: none; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
.modal-wide { width: min(1060px, calc(100vw - 20px)); }
.drawer { width: min(480px, 100vw); max-width: none; height: 100vh; height: 100dvh; max-height: none; margin: 0 0 0 auto; border-radius: 30px 0 0 30px; }
.drawer[open] { animation: slide .5s var(--ease); }
@keyframes slide { from { transform: translateX(60px); opacity: 0; } to { transform: none; opacity: 1; } }
.dlg-top { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 0 14px; background: var(--white); }
.dlg-top h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
.dlg-sub { font-size: .9rem; color: var(--muted); }

.form { display: block; }
.f { display: block; min-width: 0; margin: 14px 0 0; padding: 0; border: 0; }
.f > span, .f legend { display: block; margin-bottom: 6px; padding: 0; font-size: .82rem; font-weight: 800; }
.f em { font-style: normal; font-weight: 500; color: var(--muted); }
.f input, .f select, .f textarea { width: 100%; min-height: 50px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 16px; background: #f5fafc; color: var(--navy); font: 500 1rem var(--font); }
.f textarea { resize: vertical; }
.f input:focus, .f select:focus, .f textarea:focus { border-color: var(--blue); outline: 3px solid rgba(15, 92, 133, .25); outline-offset: 0; }
.f input.bad { border-color: var(--coral); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 16px; border: 1.5px solid var(--line); border-radius: var(--pill); background: var(--white); font-size: .86rem; font-weight: 700; }
.chip[aria-pressed="true"] { border-color: var(--navy); background: var(--navy); color: var(--white); }
.form .btn-wide { margin-top: 18px; }
.f-status { min-height: 1.4em; margin: 10px 0; font-size: .9rem; font-weight: 700; color: var(--blue); }
.f-status.error { color: var(--coral); }

.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 5px; border-radius: var(--pill); background: var(--sky); }
.tabs button { flex: 1 0 auto; height: 44px; padding: 0 16px; border: 0; border-radius: var(--pill); background: transparent; font-weight: 700; font-size: .9rem; }
.tabs button[aria-selected="true"] { background: var(--navy); color: var(--white); }
.tabpanel { display: grid; grid-template-columns: 2fr 3fr; align-items: start; gap: 26px; margin-top: 20px; }
.tabpanel > img { width: 100%; aspect-ratio: 4 / 5; border-radius: 22px; object-fit: cover; }
.tabpanel > div > * + * { margin-top: 12px; }
.tabpanel p { font-size: .93rem; color: var(--muted); }
.tabpanel .key { font-size: .95rem; }
.key b { display: block; font-size: 2.4rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; color: var(--blue); }
.points { display: flex; flex-wrap: wrap; gap: 6px; }
.points li { padding: 6px 12px; border-radius: var(--pill); background: var(--sky); font-size: .82rem; font-weight: 700; color: var(--blue-deep); }
.tabpanel .warn { padding: 12px 16px; border-radius: 16px; background: var(--wood); color: var(--walnut); }
.cites { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.cites a { color: var(--blue); font-weight: 700; font-size: .84rem; }

.gal-ctrl { display: flex; align-items: center; gap: 8px; }
.gal-ctrl span { margin-right: 6px; font-weight: 800; font-size: .9rem; white-space: nowrap; }
.gal { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gal::-webkit-scrollbar { display: none; }
.gal figure { flex: 0 0 min(760px, 88%); scroll-snap-align: start; }
.gal img { width: 100%; height: min(62vh, 520px); border-radius: 22px; object-fit: cover; }
.gal img.top { object-position: 50% 12%; }
.gal figcaption { padding-top: 12px; font-size: .9rem; color: var(--muted); }
.gal figcaption b { display: block; font-size: 1.1rem; color: var(--navy); }

.lightbox p { font-weight: 800; }
.lightbox img { max-height: 76vh; max-height: 76dvh; max-width: 100%; margin: 0 auto; border-radius: 14px; }

/* ---------- shorter desktop screens ---------- */
@media (min-width: 900px) and (max-height: 780px) {
  .panel { top: calc(50% - 2px); }
  .panel h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); }
  .panel h2 { font-size: clamp(1.6rem, 2.4vw, 2.2rem); }
  .kicker { margin-bottom: 8px; }
  .desc { margin-top: 8px; font-size: .9rem; }
  .ask { margin-top: 18px; }
  .picks button { height: 40px; }
  .hint { display: none; }
  .phase { margin: 12px 0 4px; }
  .tx details { margin-top: 6px; }
  .tx summary { min-height: 42px; padding-block: 4px; font-size: .9rem; }
  .panel > .btn { min-height: 44px; margin-top: 12px; }
  .sub { margin: 14px 0 8px; }
  .rec img { aspect-ratio: 4 / 3; }
  .rail { bottom: 10px; }
  .rail button { height: 36px; }
  .visit { padding-top: 80px; }
  .info h2 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); }
  .facts { margin: 16px 0; }
  .facts > div { padding: 9px 0; }
  .side { height: calc(100vh - 150px); }
  .screen { padding: 80px 0 18px; }
  .screen-head { margin-bottom: 16px; }
  .screen-head h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
  .frame { margin-bottom: 8px; padding: 7px; }
  .frame img { height: min(40vh, 300px); }
  .cert b { font-size: .86rem; }
  .mosaic { height: calc(100vh - 210px); min-height: 320px; }
}

/* a wider card for the headline, so it keeps to three lines on large screens */
@media (min-width: 900px) {
  .panel-hero { width: min(620px, 46vw); }
  .panel h1 em { display: block; }
}

/* ---------- phones and tablets ---------- */
@media (max-width: 899px) {
  .nav { padding: 10px 14px; }
  .nav-links { display: none; }
  .menu { display: block; }
  .nav .long { display: none; }
  .nav .short { display: inline; }

  .halo { left: 50%; top: 30%; }
  .word { bottom: auto; top: 20vh; font-size: 19.5vw; }

  /* the figure keeps the top of the screen; text sits in a card below it */
  .panel {
    left: 10px; right: 10px; top: auto; bottom: 10px;
    width: auto; max-width: 560px; max-height: calc(100% - 150px); margin-inline: auto;
    overflow-y: auto; scrollbar-width: none;
    padding: 16px;
    border-radius: 26px; background: rgba(255, 255, 255, .93); box-shadow: var(--shadow); backdrop-filter: blur(16px);
    transform: translateY(34px);
  }
  .panel.on { transform: none; }
  .kicker { margin-bottom: 8px; font-size: .7rem; }
  .kicker .n { width: 28px; height: 28px; }
  .panel h1 { font-size: clamp(1.85rem, 8.6vw, 3rem); }
  .panel h2 { font-size: clamp(1.3rem, 5.8vw, 1.9rem); }
  .desc { margin-top: 8px; font-size: .86rem; line-height: 1.45; }
  .ask { margin: 14px 0 8px; font-size: 1rem; }
  .picks { gap: 6px; }
  .picks button { height: 44px; padding: 0 14px; background: var(--sky); box-shadow: none; font-size: .85rem; }
  .hint { display: none; }
  .phase { margin: 12px 0 10px; font-size: .64rem; }
  .tx { display: flex; flex-wrap: wrap; gap: 6px; }
  .tx details { margin: 0; border-radius: 18px; background: var(--sky); box-shadow: none; }
  .tx details[open] { flex-basis: 100%; order: 1; }
  .tx summary { min-height: 40px; gap: 8px; padding: 6px 13px; font-size: .82rem; }
  .tx summary::after { font-size: 1.05rem; }
  .tx p { padding: 0 13px 10px; font-size: .82rem; }
  .panel > .btn { width: 100%; min-height: 46px; margin-top: 12px; }
  .panel-end .desc, .sub { display: none; }
  .rec { gap: 6px; margin-top: 12px; }
  .rec button { padding: 3px 2px 6px; background: var(--sky); box-shadow: none; }
  .rec img { margin-bottom: 4px; }
  .rec b { font-size: .68rem; }
  .rec small { display: none; }

  /* the area picker becomes a progress line under the header */
  .rail { left: 14px; right: 14px; top: 64px; bottom: auto; gap: 4px; padding: 0; background: none; box-shadow: none; backdrop-filter: none; }
  .rail button, .rail button:hover, .rail button[aria-current] { flex: 1; min-width: 0; height: 28px; padding: 0; background: none; }
  .rail button::before { content: ''; width: 100%; height: 4px; border-radius: 4px; background: rgba(14, 26, 51, .16); transition: background .3s; }
  .rail button.done::before { background: var(--blue); }
  .rail button[aria-current]::before { height: 6px; background: var(--navy); }
  .rail i, .rail span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

  .visit { padding: 74px 0 10px; border-radius: 30px 30px 0 0; }
  .visit-grid { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 600px; }
  .info { align-self: stretch; }
  .info h2 { font-size: clamp(1.55rem, 7vw, 2.4rem); }
  .facts { margin: 10px 0 12px; }
  .facts > div { grid-template-columns: 74px minmax(0, 1fr); gap: 8px; padding: 8px 0; }
  .facts dt { padding-top: 2px; font-size: .64rem; }
  .facts dd { font-size: .9rem; line-height: 1.4; }
  .facts small { font-size: .74rem; }
  .facts .mail { font-size: .8rem; }
  .actions .btn { flex: 1; min-height: 46px; padding: 0 12px; }
  .side { flex: 1; align-self: stretch; gap: 8px; height: auto; min-height: 0; }
  .map { min-height: 96px; }
  .map span { left: 10px; bottom: 10px; min-height: 38px; padding: 0 14px; font-size: .82rem; }

  .screen { padding: 74px 0 16px; }
  .screen-head { margin-bottom: 14px; }
  .screen-head .kicker { margin-bottom: 4px; }
  .screen-head h2 { font-size: clamp(1.5rem, 6.8vw, 2.4rem); }
  .wall { border-radius: 30px 30px 0 0; }
  .wall .screen-head > p:last-child { margin-top: 6px; font-size: .84rem; }
  .certs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; max-width: 600px; margin-inline: auto; }
  .frame { margin-bottom: 6px; padding: 5px; border-width: 2px; border-radius: 10px; }
  .frame img { height: min(23svh, 240px); }
  .cert { gap: 2px; }
  .cert b { font-size: .76rem; }
  .cert .who { font-size: .72rem; }
  .cert small { display: none; }
  .head-row { display: block; }
  .head-row .btn { width: 100%; min-height: 46px; margin-top: 12px; }
  .mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: 1.35fr 1fr 1fr; gap: 8px; height: calc(100svh - 220px); min-height: 360px; max-height: 720px; }
  .shot { border-radius: 18px; }
  .shot-big { grid-column: span 2; grid-row: auto; }
  .shot span { left: 8px; bottom: 8px; padding: 5px 10px; font-size: .72rem; }
  .foot { justify-content: center; max-width: 600px; padding-top: 8px; text-align: center; font-size: .7rem; }

  .drawer { width: 100vw; height: auto; max-height: 94vh; max-height: 94dvh; margin: auto 0 0; border-radius: 28px 28px 0 0; }
  .drawer[open] { animation: pop .45s var(--ease); }
  dialog { padding: 0 16px 20px; }
  .tabs { gap: 2px; }
  .tabs button { padding: 0 8px; font-size: .8rem; }
  .tabpanel { grid-template-columns: 1fr; gap: 14px; }
  .tabpanel > img { aspect-ratio: 16 / 9; }
  .gal img { height: min(52vh, 420px); }
  .certs { grid-template-columns: 1fr 1fr; }
  .practice { grid-template-columns: 1fr; }
  .practice img { height: 180px; }
}

/* very small phones: leave more room for the figure */
@media (max-width: 899px) and (max-height: 700px) {
  .panel .desc { display: none; }
  .panel-hero h1 { font-size: 1.6rem; }
  .wall .screen-head > p:last-child { display: none; }
  .frame img { height: 20svh; }
}

/* ---------- without JavaScript or motion ---------- */
.no-js .backdrop, .no-js #stage, .no-js .track, .no-js .rail { display: none; }
.no-js .story { display: block; }
.no-js .pin { position: static; height: auto; padding: 96px var(--gutter) 40px; pointer-events: auto; }
.no-js .panel { position: static; width: auto; max-width: 560px; margin: 0 0 56px; opacity: 1; visibility: visible; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0s !important; transition-delay: 0s !important; }
}

/* ---------- Samsung Internet dark mode ----------
   It repaints the page even though the site says "only light". It darkens backgrounds
   (gradients too) but lightens borders and inset shadows. So the weak parts are painted
   with a shadow or border in their own colour: the light look stays almost the same. */

/* solid buttons and the chapter numbers stay clear of the dark cards */
.btn:not(.btn-light):not(.btn-line), .kicker .n, .chip[aria-pressed="true"], .tabs button[aria-selected="true"] { box-shadow: inset 0 0 0 100px var(--navy); }
.btn:not(.btn-light):not(.btn-line):hover, .panel.healing .kicker .n { box-shadow: inset 0 0 0 100px var(--blue); }

/* a chosen time must look different from the others */
.chip[aria-pressed="true"] { box-shadow: inset 0 0 0 100px #0c2250; }

/* form fields keep an edge: a pale line, written as a solid colour */
.f input:not(.bad):not(:focus), .f textarea:not(:focus), .f select:not(:focus) { border-color: #c5d3da; }

/* outline button: a pale line, written as a solid colour */
.btn-line { box-shadow: inset 0 0 0 1.5px #c9d5dc; }

/* pain to relief bar: two solid colours blended by a mask, not a background gradient */
.phase i { box-shadow: inset 0 0 0 4px #e7e8eb; }
.phase b { position: relative; box-shadow: inset 0 0 0 4px var(--teal); }
.phase b::before { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 0 4px #e8563a; -webkit-mask-image: linear-gradient(90deg, #000, transparent 75%); mask-image: linear-gradient(90deg, #000, transparent 75%); }

@media (max-width: 899px) {
  /* progress line under the header */
  .rail button::before { height: 0; border-top: 4px solid #c5cfd7; background: none; }
  .rail button.done::before { border-top-color: var(--blue); background: none; }
  .rail button[aria-current]::before { height: 0; border-top: 6px solid #082c66; background: none; }

  /* treatment pills keep an edge */
  .tx details { box-shadow: inset 0 0 0 1px var(--sky); }
}

/* ---------- calmer light colours ----------
   A deeper blue-grey so the white figure stands out, a faint glow, soft surfaces,
   and darker text to match. */
:root { --sky: #b7cdd9; --sky-deep: #9db9c8; --wood: #e3d5c6; --surface: #dde8ed; --muted: #34465c; --blue: #0a4a6b; }

.halo { background: radial-gradient(circle, rgba(255, 255, 255, .34) 0, rgba(255, 255, 255, .16) 26%, rgba(255, 255, 255, 0) 56%); }
.nav.solid { background: rgba(221, 232, 237, .94); }
.menu, .round, .sheet, .visit, dialog, .dlg-top, .chip:not([aria-pressed="true"]), .map span { background: var(--surface); }
.shot span { background: rgba(221, 232, 237, .94); }
.map img { filter: brightness(.86) saturate(1.2) contrast(1.08); }
.f input, .f select, .f textarea { background: #d2e0e7; }

/* ---------- phones: keep the figure clear of the header ----------
   The camera in scene.js frames it lower. Where a close-up still reaches the top,
   it fades out under the logo, buttons and progress line. */
@media (max-width: 899px) {
  #stage { -webkit-mask-image: linear-gradient(180deg, transparent 74px, #000 100px); mask-image: linear-gradient(180deg, transparent 74px, #000 100px); }

  /* see-through cards, so the figure shows behind them; the first one a little clearer */
  .panel { background: rgba(215, 229, 236, .56); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
  .panel-hero { background: rgba(215, 229, 236, .42); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
  .panel .desc { color: var(--navy); }
  .panel .tx details, .panel .rec button, .panel-hero .picks button:not(:hover) { background: rgba(255, 255, 255, .5); box-shadow: inset 0 0 0 1px #b9cbd5; }
}
