/* ============================================================
   KPJ Penang — Orthopaedic COE Kiosk
   Brand: deep navy + KPJ bronze + warm cream  (per coe.kpjhealth.com.my)
   Type:  Sora (display) + Poppins (body)
   Canvas: fixed 1080 x 1920 portrait, scaled to fit screen
   ============================================================ */

/* ---------- fonts (vendored, offline) ---------- */
@font-face {
  font-family: "Poppins";
  src: url("../assets/fonts/poppins-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: block;
}
@font-face {
  font-family: "Poppins";
  src: url("../assets/fonts/poppins-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: block;
}
@font-face {
  font-family: "Poppins";
  src: url("../assets/fonts/poppins-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: block;
}
@font-face {
  font-family: "Poppins";
  src: url("../assets/fonts/poppins-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: block;
}
@font-face {
  font-family: "Sora";
  src: url("../assets/fonts/sora-700.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: block;
}

/* ---------- tokens ---------- */
:root {
  --navy-950: #02101f;
  --navy-900: #031432;
  --navy-800: #0a234c;
  --navy-700: #133360;
  --ink:      #0f172a;

  --bronze:        #967f65;
  --bronze-bright: #c2a37e;
  --bronze-glow:   #e8c896;
  --bronze-deep:   #6e5a44;

  --cream:  #f7f4f4;
  --beige:  #e9e4de;
  --paper:  #ffffff;
  --gray:   #848484;

  --font-body: "Poppins", "Segoe UI", sans-serif;
  --font-display: "Sora", "Poppins", sans-serif;

  --sheet-radius: 44px;
}

/* ---------- base / kiosk shell ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: var(--navy-950);
}

body {
  font-family: var(--font-body);
  color: #fff;
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

button { font-family: inherit; border: none; background: none; color: inherit; cursor: pointer; touch-action: manipulation; }
img { -webkit-user-drag: none; -webkit-user-select: none; user-select: none; }

#kiosk {
  position: absolute;
  top: 0; left: 0;
  width: 1080px; height: 1920px;
  transform-origin: top left;            /* scaled via JS to fit window */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(900px 700px at 50% 1100px, rgba(150, 127, 101, 0.16), transparent 65%),
    radial-gradient(1200px 800px at 50% -200px, #0d2a57 0%, transparent 70%),
    linear-gradient(180deg, var(--navy-900) 0%, var(--navy-950) 58%, var(--navy-900) 100%);
}

/* faint grid texture overlay for depth */
#kiosk::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 12%, #000 62%, transparent 76%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 12%, #000 62%, transparent 76%);
  pointer-events: none;
}

/* ======================= TOP BAR ======================= */
.topbar {
  flex: 0 0 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 56px;
  position: relative;
  z-index: 22;            /* stays above the doctor-sheet backdrop so the
                            language switcher is always reachable */
}

.topbar-brand { display: flex; align-items: center; gap: 24px; }

.topbar-logo { height: 44px; width: auto; display: block; }

.topbar-divider {
  width: 1px; height: 52px;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.45), transparent);
}

.topbar-hospital {
  font-size: 19px;
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.92);
}

.topbar-tagline {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 21px;
  letter-spacing: 0.02em;
  color: var(--bronze-bright);
}

.topbar-right { display: flex; align-items: center; gap: 24px; }

/* ---------- language selector (button + dropdown) ---------- */
.lang-select { position: relative; }

.lang-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 58px;
  padding: 0 24px 0 20px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.9);
  color: var(--navy-900);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.lang-trigger:active { transform: scale(0.95); }
.lang-select.is-open .lang-trigger {
  background: #ffffff;
  border-color: var(--bronze-bright);
  box-shadow: 0 0 0 3px rgba(194, 163, 126, 0.35), 0 6px 18px rgba(0, 0, 0, 0.18);
}

.lang-globe { width: 26px; height: 26px; color: var(--navy-900); }
.lang-current {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.07em;
  color: var(--navy-900);
  line-height: 1;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 262px;
  background: linear-gradient(180deg, #0b2147, var(--navy-900));
  border: 1px solid rgba(150, 127, 101, 0.42);
  border-radius: 18px;
  padding: 8px;
  box-shadow: 0 26px 64px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translateY(-10px) scale(0.98);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 30;
}
.lang-select.is-open .lang-menu {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  text-align: left;
  padding: 15px 18px;
  border-radius: 12px;
  font-size: 20px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
  transition: background 0.18s ease, color 0.18s ease;
}
.lang-option::before {
  content: "";
  width: 9px; height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  flex: 0 0 auto;
  transition: background 0.18s ease, box-shadow 0.18s ease;
}
.lang-option:active { background: rgba(255, 255, 255, 0.06); }
.lang-option.is-active { background: rgba(150, 127, 101, 0.2); color: #fff; }
.lang-option.is-active::before {
  background: var(--bronze-glow);
  box-shadow: 0 0 10px 2px rgba(232, 200, 150, 0.6);
}

/* ======================= HERO ======================= */
.hero {
  flex: 0 0 182px;
  text-align: center;
  position: relative;
  z-index: 5;
  padding-top: 10px;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--bronze-bright);
  padding-bottom: 2px;
}

.hero-eyebrow::before, .hero-eyebrow::after {
  content: "";
  display: inline-block;
  width: 56px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--bronze));
  vertical-align: middle;
  margin: 0 20px 4px;
}
.hero-eyebrow::after { background: linear-gradient(90deg, var(--bronze), transparent); }

.hero-title {
  font-family: var(--font-display);
  font-size: 66px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.05;
  margin-top: 6px;
}

.hero-title em {
  font-style: normal;
  background: linear-gradient(100deg, var(--bronze-bright) 10%, var(--bronze-glow) 50%, var(--bronze) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-tagline {
  margin-top: 12px;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.78);
}

/* ======================= STAGE ======================= */
.stage {
  flex: 1 1 auto;
  position: relative;
  z-index: 4;
  min-height: 0;
}

.stage-canvas, .stage-canvas canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
.stage-canvas { touch-action: none; }

.stage-hotspots {
  position: absolute; inset: 0;
  pointer-events: none;
  overflow: hidden;
}

/* --- hotspot --- */
.hotspot {
  position: absolute;
  top: 0; left: 0;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: opacity 0.35s ease;
  will-change: transform, opacity;
}
.hotspot.is-hidden { opacity: 0; pointer-events: none; }

.hotspot-dot {
  position: relative;
  width: 58px; height: 58px;
  flex: 0 0 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.hotspot-dot::before {                       /* pulse ring */
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(232, 200, 150, 0.85);
  animation: hotspot-pulse 2.4s ease-out infinite;
}

.hotspot-dot::after {                        /* core */
  content: "";
  width: 22px; height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe9c4, var(--bronze-bright) 55%, var(--bronze-deep));
  box-shadow: 0 0 18px 4px rgba(226, 190, 138, 0.55);
}

@keyframes hotspot-pulse {
  0%   { transform: scale(0.55); opacity: 0.9; }
  70%  { transform: scale(1.15); opacity: 0; }
  100% { transform: scale(1.15); opacity: 0; }
}

.hotspot-label {
  background: rgba(3, 20, 50, 0.78);
  border: 1px solid rgba(150, 127, 101, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-radius: 999px;
  padding: 12px 26px;
  font-size: 21px;
  font-weight: 500;
  letter-spacing: 0.03em;
  white-space: nowrap;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.hotspot[data-flip="1"] { flex-direction: row-reverse; }

.hotspot:active .hotspot-dot::after { transform: scale(1.25); }
.hotspot.is-active .hotspot-label {
  background: linear-gradient(120deg, var(--bronze), var(--bronze-bright));
  color: var(--navy-900);
  font-weight: 600;
}

/* --- "Browse All Specialists" button (top-right, replaces view toggle) --- */
.stage-browse-btn {
  position: absolute;
  top: 18px; right: 56px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 30px;
  border-radius: 999px;
  background: linear-gradient(115deg, var(--bronze-deep) 0%, var(--bronze) 35%, var(--bronze-bright) 75%, var(--bronze) 100%);
  background-size: 200% 100%;
  color: #fff;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 12px 32px rgba(150, 127, 101, 0.4), inset 0 1px 0 rgba(255,255,255,0.35);
  animation: btn-sheen 5s ease-in-out infinite;
  z-index: 3;
}
.stage-browse-btn:active { transform: scale(0.97); }
.stage-browse-icon svg { width: 27px; height: 27px; display: block; }
.stage-browse-arrow { font-size: 24px; line-height: 1; }

/* ======================= REGION CHIPS ======================= */
.regions-strip {
  flex: 0 0 auto;
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 8px 48px 84px;
}

.region-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  max-width: 1000px;
}

.region-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
  font-size: 19px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
  transition: all 0.2s ease;
}

.region-chip .chip-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--bronze-bright);
  box-shadow: 0 0 8px rgba(226, 190, 138, 0.8);
}

.region-chip:active,
.region-chip.is-active {
  background: linear-gradient(120deg, var(--bronze), var(--bronze-bright));
  border-color: transparent;
  color: var(--navy-900);
  font-weight: 600;
}
.region-chip:active .chip-dot, .region-chip.is-active .chip-dot { background: var(--navy-900); box-shadow: none; }

/* sheen animation shared by the bronze CTA buttons (top-right Browse) */
@keyframes btn-sheen {
  0%, 100% { background-position: 0% 0; }
  50% { background-position: 100% 0; }
}

/* FAQ trigger — KPJ bronze CTA that opens the FAQ popup */
.faq-trigger {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 16px 34px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: linear-gradient(115deg, var(--bronze-deep) 0%, var(--bronze) 35%, var(--bronze-bright) 75%, var(--bronze) 100%);
  background-size: 200% 100%;
  color: #fff;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 28px rgba(150, 127, 101, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  animation: btn-sheen 5s ease-in-out infinite;
  transition: transform 0.15s ease;
}
.faq-trigger-icon { width: 22px; height: 22px; color: #fff; }
.faq-trigger:active { transform: scale(0.97); }

/* ======================= ORTHOPAEDIC COE BANNER ======================= */
/* The hospital's flagship specialty, spotlighted at the top of the bottom
   strip. Muted bronze, refined proportions, gentle sheen. */
.coe-banner {
  display: flex;
  align-items: center;
  gap: 18px;
  width: min(680px, 100%);
  padding: 16px 20px;
  border-radius: 18px;
  background: linear-gradient(120deg, var(--bronze-deep) 0%, var(--bronze) 55%, var(--bronze-bright) 110%);
  color: #fff;
  text-align: left;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 30px rgba(110, 90, 68, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: transform 0.18s ease, box-shadow 0.3s ease;
}
.coe-banner:active { transform: scale(0.985); }

/* Subtle sheen sweep — calm, no aggressive glow pulse */
.coe-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.12) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: coe-sheen 7s ease-in-out infinite;
  pointer-events: none;
}
@keyframes coe-sheen {
  0%   { transform: translateX(-100%); }
  60%  { transform: translateX(100%); }
  100% { transform: translateX(100%); }
}

.coe-banner-badge {
  flex: 0 0 auto;
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.coe-banner-badge svg { width: 24px; height: 24px; color: var(--bronze-glow); }

.coe-banner-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1 1 auto;
  min-width: 0;
}
.coe-banner-eyebrow {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bronze-glow);
}
.coe-banner-title {
  font-family: var(--font-display);
  font-size: 29px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.coe-banner-sub {
  font-size: 17px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.82);
  margin-top: 2px;
}
.coe-banner-cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.32);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.coe-banner-cta-arrow { width: 16px; height: 16px; }

@media (max-width: 560px) {
  /* Compact COE banner for narrow phones — coe-banner font sizes are
     consolidated in the later @media block below to avoid cascade conflicts. */
}

/* ======================= FAQ POPUP (centered modal) ======================= */
.faq-modal {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -46%) scale(0.96);
  width: min(880px, 90%);
  max-height: 76%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--cream);
  border-radius: 36px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.55);
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  transition: opacity 0.32s ease, transform 0.42s cubic-bezier(0.32, 0.72, 0.05, 1);
}
.faq-modal.is-open {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

.faq-modal::before {                          /* bronze top accent */
  content: "";
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 120px; height: 4px;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(90deg, var(--bronze), var(--bronze-bright));
}

.faq-modal-inner {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 50px 52px 6px;
}

.faq-head {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 24px;
  padding-right: 70px;                        /* clear the close button */
}

.faq-eyebrow {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--bronze);
}

.faq-title {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  color: var(--ink);
}

.faq-list {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
  padding-right: 12px;
  padding-bottom: 8px;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.faq-list::-webkit-scrollbar { width: 8px; }
.faq-list::-webkit-scrollbar-track { background: var(--beige); border-radius: 8px; }
.faq-list::-webkit-scrollbar-thumb { background: var(--bronze); border-radius: 8px; }

.faq-item {
  background: var(--paper);
  border: 1px solid var(--beige);
  border-radius: 18px;
  margin-bottom: 11px;
  overflow: hidden;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.faq-item.is-open {
  border-color: rgba(150, 127, 101, 0.5);
  box-shadow: 0 10px 30px rgba(150, 127, 101, 0.16);
}

.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  text-align: left;
  padding: 22px 28px;
  font-size: 21px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
}

.faq-q-icon {
  flex: 0 0 36px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--cream);
  border: 1px solid var(--beige);
  display: grid;
  place-items: center;
  position: relative;
  transition: all 0.3s ease;
}
.faq-q-icon::before, .faq-q-icon::after {
  content: "";
  position: absolute;
  background: var(--bronze);
  border-radius: 2px;
  transition: transform 0.3s ease;
}
.faq-q-icon::before { width: 16px; height: 2.5px; }
.faq-q-icon::after  { width: 2.5px; height: 16px; }

.faq-item.is-open .faq-q-icon { background: var(--bronze); border-color: var(--bronze); }
.faq-item.is-open .faq-q-icon::before { background: #fff; }
.faq-item.is-open .faq-q-icon::after  { background: #fff; transform: rotate(90deg); }

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-a-inner {
  padding: 0 80px 26px 28px;
  font-size: 19px;
  line-height: 1.65;
  color: #4b5563;
}


/* ======================= DOCTOR SHEET ======================= */
.sheet-backdrop {
  position: absolute; inset: 0;
  background: rgba(2, 12, 26, 0.6);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 18;
}
.sheet-backdrop.is-open { opacity: 1; pointer-events: auto; }

.sheet {
  position: absolute;
  left: 0; right: 0;
  top: 16%; bottom: 0;            /* height follows the viewport, never overflows */
  background: var(--cream);
  border-radius: var(--sheet-radius) var(--sheet-radius) 0 0;
  transform: translateY(104%);
  transition: transform 0.55s cubic-bezier(0.32, 0.72, 0.05, 1);
  z-index: 20;
  color: var(--ink);
  overflow: hidden;
  box-shadow: 0 -24px 80px rgba(0, 0, 0, 0.5);
}
.sheet.is-open { transform: translateY(0); }

.sheet::before {                              /* grab bar */
  content: "";
  position: absolute;
  top: 16px; left: 50%;
  transform: translateX(-50%);
  width: 84px; height: 6px;
  border-radius: 99px;
  background: var(--beige);
}

.sheet-close {
  position: absolute;
  top: 34px; right: 44px;
  width: 76px; height: 76px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--beige);
  display: grid;
  place-items: center;
  z-index: 5;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.10);
}
.sheet-close svg { width: 30px; height: 30px; color: var(--ink); }
.sheet-close:active { transform: scale(0.92); }

.sheet-view {
  position: absolute; inset: 0;
  display: flex;
  flex-direction: column;
  padding: 60px 56px 0;
  opacity: 1;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.sheet-view.is-hidden { opacity: 0; pointer-events: none; transform: translateX(40px); }

/* ---- list view ---- */
.sheet-head { flex: 0 0 auto; padding-right: 120px; }

.sheet-eyebrow {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--bronze);
  margin-bottom: 8px;
}

.sheet-title {
  font-family: var(--font-display);
  font-size: 50px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink);
}

.sheet-blurb {
  margin-top: 12px;
  font-size: 23px;
  line-height: 1.55;
  color: #4b5563;
  max-width: 850px;
}

.sheet-conditions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.condition-tag {
  padding: 10px 22px;
  border-radius: 999px;
  background: rgba(150, 127, 101, 0.12);
  border: 1px solid rgba(150, 127, 101, 0.35);
  color: var(--bronze-deep);
  font-size: 19px;
  font-weight: 500;
}

.sheet-body {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
  margin-top: 28px;
  padding-right: 14px;
  padding-bottom: 28px;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.sheet-body::-webkit-scrollbar { width: 9px; }
.sheet-body::-webkit-scrollbar-track { background: var(--beige); border-radius: 9px; }
.sheet-body::-webkit-scrollbar-thumb { background: var(--bronze); border-radius: 9px; }

.doctor-group-title {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 600;
  color: var(--bronze-deep);
  margin: 26px 2px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.doctor-group-title:first-child { margin-top: 2px; }
.doctor-group-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(150,127,101,0.45), transparent);
}

.doctor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

/* ---- doctor card ---- */
.doctor-card {
  display: flex;
  align-items: center;
  gap: 24px;
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--beige);
  border-radius: 26px;
  padding: 26px 28px;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.doctor-card::after {
  content: "";
  position: absolute;
  left: 0; top: 18%; bottom: 18%;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, var(--bronze-bright), var(--bronze));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.doctor-card:active { transform: scale(0.98); box-shadow: 0 12px 32px rgba(150, 127, 101, 0.22); }
.doctor-card:active::after { opacity: 1; }

.doctor-avatar {
  flex: 0 0 122px;
  width: 122px; height: 122px;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 30% 25%, #fdfbf8, var(--beige));
  border: 2px solid rgba(150, 127, 101, 0.35);
  display: grid;
  place-items: center;
  position: relative;
}
.avatar-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
  display: block;
}
.avatar-initials {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 700;
  color: var(--bronze);
}

.doctor-card-info { min-width: 0; flex: 1; }

.doctor-card-name {
  font-size: 27px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
}

.doctor-card-sub {
  display: inline-block;
  margin-top: 8px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--bronze-deep);
  background: rgba(150, 127, 101, 0.13);
  padding: 6px 16px;
  border-radius: 999px;
}

.doctor-card-meta {
  margin-top: 9px;
  font-size: 19px;
  color: var(--gray);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doctor-card-cta {
  flex: 0 0 auto;
  align-self: center;
  font-size: 26px;
  color: var(--bronze);
}

.sheet-more {
  display: block;
  width: 100%;
  margin-top: 22px;
  padding: 24px;
  border-radius: 22px;
  border: 1.5px dashed rgba(150, 127, 101, 0.5);
  background: rgba(150, 127, 101, 0.06);
  font-size: 22px;
  color: #4b5563;
  text-align: center;
}
.sheet-more b { color: var(--bronze-deep); font-weight: 600; }
.sheet-more:active { background: rgba(150, 127, 101, 0.15); }

.sheet-note {
  flex: 0 0 auto;
  padding: 18px 0 26px;
  font-size: 19px;
  color: var(--gray);
  text-align: center;
  border-top: 1px solid var(--beige);
}

/* ---- profile view ---- */
.sheet-profile-view { padding-top: 48px; }

.profile-back {
  flex: 0 0 auto;
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 600;
  color: var(--bronze-deep);
  background: rgba(150, 127, 101, 0.12);
  border: 1px solid rgba(150, 127, 101, 0.3);
  padding: 14px 30px 14px 22px;
  border-radius: 999px;
  margin-bottom: 30px;
}
.profile-back svg { width: 24px; height: 24px; }
.profile-back:active { transform: scale(0.96); }

.profile-content {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
  padding-right: 14px;
  padding-bottom: 36px;
  overscroll-behavior: contain;
  touch-action: pan-y;
}
.profile-content::-webkit-scrollbar { width: 9px; }
.profile-content::-webkit-scrollbar-track { background: var(--beige); border-radius: 9px; }
.profile-content::-webkit-scrollbar-thumb { background: var(--bronze); border-radius: 9px; }

.profile-top {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.profile-photo {
  flex: 0 0 300px;
  width: 300px; height: 340px;
  border-radius: 28px;
  overflow: hidden;
  background: radial-gradient(circle at 30% 20%, #ffffff, var(--beige));
  border: 1px solid var(--beige);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  display: grid;
  place-items: center;
  position: relative;
}
.profile-photo .avatar-initials { font-size: 84px; }

.profile-main { flex: 1; min-width: 0; }

.profile-spec-chip {
  display: inline-block;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bronze-deep);
  background: rgba(150, 127, 101, 0.13);
  border: 1px solid rgba(150, 127, 101, 0.3);
  padding: 9px 22px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.profile-name {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 700;
  line-height: 1.12;
  color: var(--ink);
}

.profile-specialty {
  margin-top: 10px;
  font-size: 24px;
  color: var(--gray);
}
.profile-specialty b { color: var(--bronze-deep); font-weight: 600; }

.profile-blurb {
  margin-top: 16px;
  font-size: 22px;
  line-height: 1.55;
  font-weight: 500;
  color: var(--ink);
  max-width: 62ch;
}

.profile-quals {
  margin-top: 24px;
  background: var(--paper);
  border: 1px solid var(--beige);
  border-left: 4px solid var(--bronze);
  border-radius: 16px;
  padding: 24px 28px;
  font-size: 21px;
  line-height: 1.65;
  color: #374151;
}

.profile-quals-label {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--bronze);
  margin-bottom: 8px;
}

.profile-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 26px;
}

.meta-card {
  background: var(--paper);
  border: 1px solid var(--beige);
  border-radius: 18px;
  padding: 18px 22px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.meta-icon {
  flex: 0 0 46px;
  width: 46px; height: 46px;
  border-radius: 14px;
  background: rgba(150, 127, 101, 0.13);
  display: grid;
  place-items: center;
  color: var(--bronze-deep);
}
.meta-icon svg { width: 24px; height: 24px; }

.meta-label {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray);
}

.meta-value {
  margin-top: 4px;
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
}

.profile-cta {
  margin-top: 28px;
  background: linear-gradient(115deg, var(--navy-900), var(--navy-700));
  border-radius: 22px;
  padding: 26px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: #fff;
}

.profile-cta-text .cta-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
}
.profile-cta-text .cta-sub {
  margin-top: 6px;
  font-size: 18px;
  color: rgba(255,255,255,0.7);
}

.profile-cta-phone {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--bronze-glow);
  white-space: nowrap;
}

/* ======================= ATTRACT OVERLAY ======================= */
.attract {
  position: absolute; inset: 0;
  z-index: 40;
  background: radial-gradient(820px 640px at 50% 34%, rgba(3, 20, 50, 0.1), rgba(2, 12, 26, 0.8));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 1010px;
  gap: 40px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}
.attract.is-on { opacity: 1; pointer-events: auto; }

.attract-ring {
  width: 130px; height: 130px;
  border-radius: 50%;
  border: 3px solid var(--bronze-glow);
  position: relative;
  animation: attract-pop 2.2s ease-out infinite;
}
.attract-ring::after {
  content: "";
  position: absolute;
  inset: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe9c4, var(--bronze-bright) 60%, var(--bronze-deep));
  box-shadow: 0 0 36px 8px rgba(226, 190, 138, 0.6);
}

@keyframes attract-pop {
  0%   { transform: scale(0.7); opacity: 1; }
  70%  { transform: scale(1.25); opacity: 0; }
  100% { transform: scale(1.25); opacity: 0; }
}

.attract-text {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
  text-shadow: 0 6px 30px rgba(0,0,0,0.6);
  animation: attract-fade 2.2s ease-in-out infinite;
}

@keyframes attract-fade {
  0%, 100% { opacity: 0.65; }
  50% { opacity: 1; }
}

/* ============================================================
   WHOLE-HOSPITAL UPGRADE — additions for the realistic GLB
   avatar, male/female toggle, care-area filters and booking QR.
   Themed to the KPJ navy + bronze identity above.
   ============================================================ */

/* --- figure (male / female) toggle — mirrors the view toggle, top-left --- */
.stage-figure-toggle {
  position: absolute;
  top: 18px; left: 56px;
  display: flex;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 6px;
  gap: 6px;
  z-index: 3;
}
.figure-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px 14px 22px;
  border-radius: 999px;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.72);
  transition: all 0.25s ease;
}
.figure-btn svg { width: 23px; height: 23px; flex: 0 0 auto; }
.figure-btn.is-active {
  background: linear-gradient(120deg, var(--bronze), var(--bronze-bright));
  color: var(--navy-900);
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(150, 127, 101, 0.45);
}

/* small attribution for the licensed 3D scan */
.model-credit {
  position: absolute;
  right: 22px; bottom: 12px;
  z-index: 3;
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.38);
  pointer-events: none;
}

/* label above the "more care areas" chip row */
.regions-label {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.region-chip.is-hidden { display: none; }

.actions-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 2px;
}

/* --- filter chips inside the "All Specialists" sheet (on cream) --- */
.sheet-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.filter-chip {
  padding: 11px 22px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 500;
  background: rgba(150, 127, 101, 0.1);
  border: 1px solid var(--beige);
  color: #4b5563;
  transition: all 0.18s ease;
}
.filter-chip:active { transform: scale(0.97); }
.filter-chip.is-active {
  background: linear-gradient(120deg, var(--bronze), var(--bronze-bright));
  border-color: transparent;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(150, 127, 101, 0.32);
}

/* Orthopaedics — the COE's headline filter, highlighted even when inactive */
.filter-chip-ortho {
  background: rgba(150, 127, 101, 0.16);
  border-color: var(--bronze);
  color: var(--bronze-deep);
  font-weight: 600;
}
.filter-chip-ortho::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--bronze);
  vertical-align: middle;
}
.filter-chip-ortho.is-active { color: #fff; }
.filter-chip-ortho.is-active::before { background: #fff; }

/* count badge in the specialty group headings */
.doctor-group-title .group-count {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--bronze-deep);
  background: rgba(150, 127, 101, 0.14);
  border-radius: 999px;
  padding: 3px 12px;
}

/* once a headshot loads, hide the monogram behind it */
.has-photo .avatar-initials { display: none; }

/* meta card spanning both columns (clinic hours) */
.meta-card-wide { grid-column: 1 / -1; }

/* --- per-doctor booking block (QR + call) --- */
.profile-book {
  margin-top: 26px;
  background: linear-gradient(115deg, var(--navy-900), var(--navy-700));
  border-radius: 22px;
  padding: 28px 32px;
  display: flex;
  align-items: center;
  gap: 30px;
  color: #fff;
}
.profile-book-qr {
  flex: 0 0 auto;
  width: 158px; height: 158px;
  border-radius: 16px;
  background: #fff;
  padding: 10px;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.profile-book-qr canvas { width: 138px; height: 138px; display: block; }
.profile-book-main { min-width: 0; }
.book-eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bronze-glow);
  margin-bottom: 8px;
}
.book-title { font-family: var(--font-display); font-size: 27px; font-weight: 700; line-height: 1.15; }
.book-sub { margin-top: 8px; font-size: 18px; line-height: 1.45; color: rgba(255, 255, 255, 0.72); }
.book-call {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  gap: 12px;
}
.book-call-icon {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgba(232, 200, 150, 0.16);
  color: var(--bronze-glow);
}
.book-call-icon svg { width: 21px; height: 21px; }
.book-call-text { display: flex; flex-direction: column; line-height: 1.25; }
.book-call-label { font-size: 14px; color: rgba(255, 255, 255, 0.6); }
.book-call-num { font-family: var(--font-display); font-size: 24px; font-weight: 700; color: #fff; }

/* ============================================================
   Mobile/Tablet readability boost
   Keep the visual hierarchy identical, but increase text density for
   handheld viewing distance.
   ============================================================ */
@media (max-width: 900px) {
  .topbar-hospital { font-size: 22px; }
  .topbar-tagline { font-size: 24px; }
  .lang-current { font-size: 25px; }
  .lang-option { font-size: 22px; }

  .hero-eyebrow { font-size: 20px; }
  .hero-title { font-size: 72px; }
  .hero-tagline { font-size: 18px; }

  .figure-btn { font-size: 23px; }
  .stage-browse-btn { font-size: 24px; padding: 18px 34px; }
  .hotspot-label { font-size: 24px; padding: 13px 30px; }

  .coe-banner-title { font-size: 21px; }
  .coe-banner-sub { font-size: 13px; }
  .coe-banner-cta { font-size: 14px; }
  .region-chip { font-size: 22px; }
  .faq-trigger { font-size: 22px; }

  .faq-q { font-size: 23px; }
  .faq-a-inner { font-size: 21px; }

  .sheet-title { font-size: 50px; }
  .sheet-blurb { font-size: 24px; }
  .filter-chip { font-size: 19px; }
  .doctor-group-title { font-size: 26px; }
  .doctor-card-name { font-size: 25px; }
  .doctor-card-sub { font-size: 18px; }
  .doctor-card-meta { font-size: 18px; }
  .sheet-more { font-size: 22px; }
  .sheet-note { font-size: 19px; }

  .profile-back { font-size: 22px; }
  .profile-name { font-size: 48px; }
  .profile-specialty { font-size: 24px; }
  .profile-blurb { font-size: 22px; }
  .profile-quals { font-size: 21px; }
  .meta-value { font-size: 22px; }
  .book-title { font-size: 30px; }
  .book-sub { font-size: 20px; }
  .book-call-num { font-size: 26px; }
}

@media (max-width: 560px) {
  .hero-title { font-size: 76px; }
  .hero-tagline { font-size: 16px; }
  .hotspot-label { font-size: 26px; }
  .stage-browse-btn { font-size: 26px; }
  .figure-btn { font-size: 25px; }
  .region-chip { font-size: 25px; }
  .faq-trigger { font-size: 25px; }

  /* keep the COE banner compact but still readable on narrow phones */
  .coe-banner { gap: 14px; padding: 16px 18px; border-radius: 16px; }
  .coe-banner-badge { width: 46px; height: 46px; border-radius: 12px; }
  .coe-banner-badge svg { width: 24px; height: 24px; }
  .coe-banner-eyebrow { font-size: 13px; letter-spacing: 0.18em; }
  .coe-banner-title { font-size: 22px; }
  .coe-banner-sub { font-size: 15px; }
  .coe-banner-cta { padding: 10px 18px; font-size: 16px; }

  /* Doctor listing — make every label clearly legible on phones */
  .sheet-eyebrow { font-size: 18px; }
  .sheet-title { font-size: 44px; }
  .sheet-blurb { font-size: 24px; }
  .condition-tag { font-size: 21px; padding: 11px 24px; }
  .doctor-group-title { font-size: 28px; }
  .doctor-card-name { font-size: 27px; }
  .doctor-card-sub { font-size: 20px; padding: 7px 18px; }
  .doctor-card-meta { font-size: 20px; }
  .sheet-more { font-size: 24px; }
  .sheet-note { font-size: 20px; }

  /* Doctor profile */
  .profile-spec-chip { font-size: 19px; padding: 10px 24px; }
  .profile-name { font-size: 46px; }
  .profile-specialty { font-size: 25px; }
  .profile-blurb { font-size: 23px; }
  .profile-quals { font-size: 22px; }
  .profile-quals-label { font-size: 17px; }
  .meta-label { font-size: 17px; }
  .meta-value { font-size: 23px; }
}

/* Runtime class-based boost (set from main.js) so font scaling still works
   when the fixed kiosk surface is transform-scaled on phones/tablets. */
body.is-handheld .topbar-hospital { font-size: 24px; }
body.is-handheld .topbar-tagline { font-size: 26px; }
body.is-handheld .lang-current { font-size: 26px; }
body.is-handheld .lang-option { font-size: 23px; }
body.is-handheld .hero-eyebrow { font-size: 22px; }
body.is-handheld .hero-title { font-size: 74px; }
body.is-handheld .hero-tagline { font-size: 17px; }
body.is-handheld .figure-btn { font-size: 24px; }
body.is-handheld .stage-browse-btn { font-size: 27px; padding: 19px 36px; }
body.is-handheld .hotspot-label { font-size: 27px; padding: 14px 32px; }
body.is-handheld .coe-banner-eyebrow { font-size: 15px; }
body.is-handheld .coe-banner-title { font-size: 26px; }
body.is-handheld .coe-banner-sub { font-size: 17px; }
body.is-handheld .coe-banner-cta { font-size: 17px; }
body.is-handheld .region-chip { font-size: 25px; }
body.is-handheld .faq-trigger { font-size: 25px; }
body.is-handheld .faq-q { font-size: 26px; }
body.is-handheld .faq-a-inner { font-size: 23px; }
body.is-handheld .sheet-eyebrow { font-size: 19px; }
body.is-handheld .sheet-title { font-size: 58px; }
body.is-handheld .sheet-blurb { font-size: 27px; }
body.is-handheld .filter-chip { font-size: 21px; }
body.is-handheld .condition-tag { font-size: 22px; }
body.is-handheld .doctor-group-title { font-size: 30px; }
body.is-handheld .doctor-card-name { font-size: 30px; }
body.is-handheld .doctor-card-sub { font-size: 22px; }
body.is-handheld .doctor-card-meta { font-size: 22px; }
body.is-handheld .sheet-more { font-size: 25px; }
body.is-handheld .sheet-note { font-size: 21px; }
body.is-handheld .profile-back { font-size: 25px; }
body.is-handheld .profile-spec-chip { font-size: 20px; }
body.is-handheld .profile-name { font-size: 54px; }
body.is-handheld .profile-specialty { font-size: 27px; }
body.is-handheld .profile-blurb { font-size: 24px; }
body.is-handheld .profile-quals { font-size: 23px; }
body.is-handheld .profile-quals-label { font-size: 18px; }
body.is-handheld .meta-label { font-size: 18px; }
body.is-handheld .meta-value { font-size: 24px; }
body.is-handheld .book-title { font-size: 32px; }
body.is-handheld .book-sub { font-size: 21px; }
body.is-handheld .book-call-num { font-size: 28px; }

body.is-phone .hero-title { font-size: 80px; }
body.is-phone .hero-tagline { font-size: 16px; }
body.is-phone .hotspot-label { font-size: 28px; }
body.is-phone .stage-browse-btn { font-size: 28px; }
body.is-phone .region-chip { font-size: 26px; }
body.is-phone .faq-trigger { font-size: 26px; }
body.is-phone .coe-banner-eyebrow { font-size: 14px; }
body.is-phone .coe-banner-title { font-size: 24px; }
body.is-phone .coe-banner-sub { font-size: 16px; }
body.is-phone .coe-banner-cta { font-size: 16px; }

/* if the QR couldn't render, drop the empty white box */
.profile-book:not(.has-qr) .profile-book-qr { display: none; }

/* --- graceful no-WebGL fallback --- */
.no-3d .stage-hotspots,
.no-3d .model-credit,
.no-3d .stage-figure-toggle { display: none; }
