/* ==========================================================================
   BONE SIP — Brand layer v3
   Loaded after style.css. Holds the visual components introduced in the
   rebrand: splash, choice tiles, rings, pillar heroes, motion.
   Tokens live in style.css :root.
   ========================================================================== */

/* ---------- Base refinements ---------- */
html, body {
  touch-action: pan-x pan-y;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(229, 48, 95, 0.06), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(74, 63, 122, 0.06), transparent 60%),
    var(--bg-primary);
  background-attachment: fixed;
  font-family: var(--font-body);
}

button, input, select, textarea, optgroup {
  font-family: inherit;
}

h1, h2, h3, h4, h5 { font-family: var(--font-heading); letter-spacing: -0.01em; color: var(--text-primary); }

:focus-visible { outline: 3px solid rgba(229, 48, 95, 0.55); outline-offset: 2px; border-radius: 10px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100000; background: var(--brand-navy); color: #fff; padding: 8px 14px; border-radius: 10px; }
.skip-link:focus { left: 8px; }
.noscript { padding: 40px 20px; text-align: center; font-weight: 700; }
.muted-xs { font-size: 0.74rem; color: var(--text-muted); font-weight: 600; }
.btn-full { width: 100%; }

/* ---------- 3D illustration icons ---------- */
.i3d { display: inline-block; object-fit: contain; user-select: none; -webkit-user-drag: none; filter: drop-shadow(0 6px 10px rgba(42, 37, 64, 0.14)); }
.i3d-sm { width: 40px; height: 40px; }
.i3d-md { width: 44px; height: 44px; }
.i3d-lg { width: 72px; height: 72px; }
.i3d-xl { width: 120px; height: 120px; }

/* ---------- Motion system ---------- */
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes popIn { 0% { opacity: 0; transform: translateY(14px) scale(0.92); } 100% { opacity: 1; transform: none; } }
@keyframes fadeUp { 0% { opacity: 0; transform: translateY(10px); } 100% { opacity: 1; transform: none; } }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }
@keyframes pulseRing { 0% { box-shadow: 0 0 0 0 rgba(229, 48, 95, 0.45); } 100% { box-shadow: 0 0 0 16px rgba(229, 48, 95, 0); } }
@keyframes shine { 0% { transform: translateX(-120%) skewX(-20deg); } 60%, 100% { transform: translateX(220%) skewX(-20deg); } }
@keyframes checkPop { 0% { transform: scale(0.4); } 70% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes blobDrift { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(30px, -20px) scale(1.08); } 66% { transform: translate(-20px, 20px) scale(0.95); } }
@keyframes logoReveal { 0% { opacity: 0; clip-path: inset(0 100% 0 0); transform: scale(0.96); } 100% { opacity: 1; clip-path: inset(0 0 0 0); transform: none; } }

.float { animation: floatY 3.2s ease-in-out infinite; }
.pop { opacity: 0; animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; animation-delay: calc(var(--i, 0) * 70ms); }
.fade-up { opacity: 0; animation: fadeUp 0.45s ease forwards; animation-delay: calc(var(--i, 0) * 60ms); }

/* Room check transition animations */
.room-transition-out {
  animation: roomSlideOut 0.24s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
  pointer-events: none;
}
.room-transition-in {
  animation: roomSlideIn 0.32s cubic-bezier(0.16, 1, 0.3, 1) both !important;
}
@keyframes roomSlideOut {
  0% { opacity: 1; transform: translateX(0) scale(1); }
  100% { opacity: 0; transform: translateX(-24px) scale(0.98); }
}
@keyframes roomSlideIn {
  0% { opacity: 0; transform: translateX(28px) scale(0.98); }
  100% { opacity: 1; transform: translateX(0) scale(1); }
}

/* ---------- Primary CTA ---------- */
.cta-btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--grad-brand); color: #fff;
  font-family: var(--font-heading); font-weight: 700; font-size: 1.02rem; letter-spacing: 0.01em;
  padding: 14px 26px; border: none; border-radius: var(--radius-full);
  box-shadow: var(--shadow-brand); cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-normal), filter var(--transition-fast);
  min-height: 50px;
}
.cta-btn::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  animation: shine 3.6s ease-in-out infinite;
}
.cta-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -10px rgba(229, 48, 95, 0.6); }
.cta-btn:active { transform: translateY(0) scale(0.98); }
.cta-btn.cta-lg { font-size: 1.1rem; padding: 16px 34px; min-width: 240px; }
.cta-btn.protect { background: linear-gradient(120deg, #332D4B, #4A3F7A 60%, #6A5DA8); box-shadow: 0 10px 24px -8px rgba(74, 63, 122, 0.5); }
.cta-btn.strengthen { background: linear-gradient(120deg, #6B2A5C, #8E2C6A 60%, #B1315D); box-shadow: 0 10px 24px -8px rgba(142, 44, 106, 0.5); }
.cta-btn:disabled, .cta-btn[disabled] { filter: grayscale(0.7); opacity: 0.5; cursor: not-allowed; pointer-events: none; }

.btn-primary { background: var(--grad-brand); border: none; }
.btn-primary:hover { background: var(--grad-brand); filter: brightness(1.05); }
.btn-outline { background: #fff; border: 1.5px solid var(--border-medium); color: var(--text-primary); }
.btn-outline:hover { border-color: var(--build); color: var(--build); }

.link-btn { background: none; border: none; color: var(--build); font-weight: 700; font-size: 0.86rem; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 6px 4px; }
.link-btn.danger { color: var(--danger); }
.link-btn i.fa-chevron-right { font-size: 0.7rem; }

/* ---------- Chips ---------- */
.step-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em;
  padding: 5px 12px; border-radius: var(--radius-full);
  background: var(--build-bg); color: var(--build);
}
.step-chip.protect { background: var(--protect-bg); color: var(--protect); }
.step-chip.strengthen { background: var(--strengthen-bg); color: var(--strengthen); }
.step-chip.muted { background: var(--bg-surface-elevated); color: var(--text-muted); }

/* ==========================================================================
   SPLASH
   ========================================================================== */
.splash {
  position: fixed; inset: 0; z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  background: #fff; overflow: hidden; padding: 24px;
  transition: transform 0.6s cubic-bezier(0.85, 0, 0.15, 1), opacity 0.5s ease;
}
.splash.dismissed { transform: translateY(-100%); opacity: 0; pointer-events: none; }
.splash.hidden { display: none; }
.splash-bg { position: absolute; inset: 0; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.55; animation: blobDrift 14s ease-in-out infinite; }
.blob-1 { width: 380px; height: 380px; background: #FBC4D3; top: -120px; right: -80px; }
.blob-2 { width: 320px; height: 320px; background: #D9D3F0; bottom: -100px; left: -80px; animation-delay: -4s; }
.blob-3 { width: 240px; height: 240px; background: #F6D2E5; top: 45%; left: 55%; animation-delay: -8s; }

.splash-orbit { position: absolute; inset: 0; pointer-events: none; }
/* Icons float in the empty top/bottom bands so they never cover the logo or copy. */
.orbit-icon { position: absolute; width: 58px; height: 58px; animation: floatY 4s ease-in-out infinite, popIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.orbit-icon.o1 { top: 7%;  left: 9%;  animation-delay: 0s, 0.5s; transform: rotate(-8deg); }
.orbit-icon.o2 { top: 4%;  left: calc(50% - 29px); animation-delay: -1.2s, 0.6s; }
.orbit-icon.o3 { top: 9%;  right: 9%; animation-delay: -2.1s, 0.7s; }
.orbit-icon.o4 { bottom: 8%; left: 10%; animation-delay: -0.6s, 0.8s; }
.orbit-icon.o5 { bottom: 5%; left: calc(50% - 29px); animation-delay: -1.8s, 0.9s; }
.orbit-icon.o6 { bottom: 9%; right: 10%; animation-delay: -2.6s, 1s; }
@media (min-height: 900px) and (min-width: 700px) {
  .orbit-icon { width: 76px; height: 76px; }
  .orbit-icon.o1 { top: 12%; left: 18%; }
  .orbit-icon.o3 { top: 14%; right: 18%; }
  .orbit-icon.o4 { bottom: 12%; left: 18%; }
  .orbit-icon.o6 { bottom: 14%; right: 18%; }
}
@media (max-height: 640px) { .orbit-icon { display: none; } }

.splash-content { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 440px; width: 100%; }
.splash-logo { width: min(82vw, 380px); height: auto; animation: logoReveal 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both; }
.splash-sub { margin: 18px 0 18px; color: var(--text-secondary); font-size: 1.02rem; font-weight: 500; animation: fadeUp 0.6s ease 0.8s both; }
.splash-pillars { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 26px; }
.pillar-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 8px; border-radius: var(--radius-full); background: #fff; border: 1px solid var(--border-subtle); font-weight: 700; font-size: 0.84rem; box-shadow: var(--shadow-sm); animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.pillar-chip.build { color: var(--build); animation-delay: 1s; }
.pillar-chip.protect { color: var(--protect); animation-delay: 1.12s; }
.pillar-chip.strengthen { color: var(--strengthen); animation-delay: 1.24s; }
.splash .cta-btn { animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 1.4s both; }
.splash-foot { margin-top: 22px; font-size: 0.8rem; color: var(--text-muted); font-weight: 600; animation: fadeUp 0.6s ease 1.6s both; }
.splash-foot i { color: var(--brand-pink); }

/* ==========================================================================
   ONBOARDING
   ========================================================================== */
.onboarding-tour-overlay { background: radial-gradient(800px 500px at 50% 0%, #FDECF1, #F8F6FB 70%); }
.onboarding-tour-container { width: 100%; max-width: 440px; min-height: min(720px, 100%); display: flex; flex-direction: column; }
.onboarding-top-bar { display: flex; justify-content: space-between; align-items: center; padding: 6px 2px 0; }
.onboarding-logo { height: 34px; width: auto; }
.onboarding-skip-btn { background: none; border: none; color: var(--text-muted); font-weight: 700; cursor: pointer; padding: 8px 12px; border-radius: 10px; }
.onboarding-carousel-stage { flex: 1; display: flex; align-items: center; position: relative; }
.onboard-slide { display: none; width: 100%; text-align: center; padding: 10px 6px; }
.onboard-slide.active { display: block; animation: fadeUp 0.45s ease both; }
.onboard-art { position: relative; height: 260px; margin: 0 auto 22px; display: flex; align-items: center; justify-content: center; }
.onboard-art::before { content: ""; position: absolute; width: 230px; height: 230px; border-radius: 50%; background: var(--grad-brand-soft); box-shadow: inset 0 0 0 10px rgba(255, 255, 255, 0.7); }
.onboard-art .hero { position: relative; width: 132px; height: 132px; z-index: 2; }
.onboard-art .sat { position: absolute; width: 64px; height: 64px; z-index: 3; }
.onboard-art .sat.s1 { top: 14px; left: calc(50% - 128px); }
.onboard-art .sat.s2 { top: 22px; right: calc(50% - 130px); }
.onboard-art .sat.s3 { bottom: 12px; left: calc(50% - 30px); }
.onboard-art.trio { gap: 10px; }
.onboard-art.trio::before { width: 280px; height: 200px; border-radius: 40px; }
.trio-item { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 800; font-size: 0.82rem; }
.trio-item img { width: 76px; height: 76px; }
.trio-item.build { color: var(--build); }
.trio-item.protect { color: var(--protect); }
.trio-item.strengthen { color: var(--strengthen); }
.trio-arrow { position: relative; z-index: 2; color: var(--border-strong); font-size: 0.9rem; margin-bottom: 22px; }
.onboard-eyebrow { font-size: 0.74rem; font-weight: 800; letter-spacing: 0.14em; color: var(--build); margin-bottom: 8px; }
.onboard-heading { font-size: clamp(1.6rem, 6vw, 2rem); font-weight: 800; line-height: 1.15; margin: 0 0 10px; }
.onboard-desc { color: var(--text-secondary); font-size: 1rem; margin: 0 auto; max-width: 320px; }
.onboarding-bottom-bar { display: flex; justify-content: space-between; align-items: center; padding: 14px 2px 8px; gap: 16px; }
.onboarding-dots-indicator { display: flex; gap: 8px; }
.onboard-dot { width: 8px; height: 8px; border-radius: 8px; background: var(--border-medium); cursor: pointer; transition: all var(--transition-normal); border: none; padding: 0; }
.onboard-dot.active { width: 26px; background: var(--grad-brand); }

/* ==========================================================================
   HEADER & NAV
   ========================================================================== */
.app-header { background: rgba(255, 255, 255, 0.88); }
.header-inner { max-width: var(--max-width-app, 680px); width: 100%; margin: 0 auto; padding: 0 16px; }
.brand-logo { background: none; border: none; padding: 4px 0; cursor: pointer; display: flex; align-items: center; }
.header-logo-img { height: 38px; width: auto; display: block; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-pill { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1.5px solid var(--border-subtle); border-radius: var(--radius-full); padding: 6px 12px; font-weight: 700; font-size: 0.82rem; color: var(--text-primary); cursor: pointer; transition: border-color var(--transition-fast), transform var(--transition-fast); }
.icon-pill:hover { border-color: var(--build); transform: translateY(-1px); }
.icon-pill img { width: 22px; height: 22px; }

.header-report-btn {
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  border-style: none !important;
  outline: 0 !important;
  outline-style: none !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  -webkit-tap-highlight-color: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0 !important;
  cursor: pointer;
  transition: transform var(--transition-bounce), filter var(--transition-fast);
}
.header-report-btn:hover {
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  transform: scale(1.12);
  filter: drop-shadow(0 4px 8px rgba(181, 39, 87, 0.25));
}
.header-report-btn:active,
.header-report-btn:focus,
.header-report-btn:focus-visible {
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  transform: scale(0.92);
}
.header-report-btn img,
.header-report-img {
  width: 40px !important;
  height: 40px !important;
  object-fit: contain;
  display: block;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  transition: transform var(--transition-bounce);
}
@media (max-width: 520px) {
  .header-report-btn {
    background: transparent !important;
    background-color: transparent !important;
    border: 0 !important;
    outline: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
  }
  .header-report-btn img,
  .header-report-img {
    width: 38px !important;
    height: 38px !important;
  }
}
.avatar-btn { position: relative; width: 40px; height: 40px; border-radius: 50%; border: none; background: var(--grad-brand); color: #fff; font-size: 1rem; cursor: pointer; display: grid; place-items: center; box-shadow: var(--shadow-brand); transition: transform var(--transition-fast); }
.avatar-btn:hover { transform: translateY(-1px); }
.avatar-dot { position: absolute; right: -2px; bottom: -2px; width: 17px; height: 17px; border-radius: 50%; background: var(--success); color: #fff; font-size: 0.55rem; display: grid; place-items: center; border: 2px solid #fff; }
.profile-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--build-bg); color: var(--build); border: 1.5px solid #F8C8D5; padding: 6px 12px; border-radius: var(--radius-full); font-size: 0.8rem; font-weight: 800; cursor: pointer; max-width: 46vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pillar-bottom-nav {
  left: 50%; right: auto; transform: translateX(-50%);
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  width: min(var(--max-width-app, 680px), calc(100% - 24px));
  max-width: var(--max-width-app, 680px);
  height: 72px;
  border-radius: 24px; border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 12px 36px -10px rgba(42, 37, 64, 0.28);
  padding: 6px 8px;
}
.pillar-nav-btn { flex: 1; min-width: 0; border-radius: 18px; padding: 6px 4px; gap: 2px; color: var(--text-muted); position: relative; }
.pillar-nav-icon { position: relative; width: 34px; height: 34px; display: grid; place-items: center; }
.pillar-nav-icon img { width: 32px; height: 32px; transition: transform var(--transition-bounce), filter var(--transition-normal); }
.pillar-nav-btn.locked .pillar-nav-icon img { filter: grayscale(1) opacity(0.45); }
.pillar-nav-icon .lock-badge { position: absolute; right: -6px; bottom: -3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; color: var(--text-muted); font-size: 0.56rem; display: grid; place-items: center; box-shadow: 0 1px 4px rgba(42, 37, 64, 0.25); }
.pillar-nav-btn.active { background: var(--build-bg); color: var(--build); }
.pillar-nav-btn.pillar-protect.active { background: var(--protect-bg); color: var(--protect); }
.pillar-nav-btn.pillar-strengthen.active { background: var(--strengthen-bg); color: var(--strengthen); }
.pillar-nav-btn.active .pillar-nav-icon img { transform: translateY(-2px) scale(1.08); }
.pillar-nav-btn.done::after { content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; top: 4px; right: calc(50% - 24px); width: 16px; height: 16px; border-radius: 50%; background: var(--success); color: #fff; font-size: 0.5rem; display: grid; place-items: center; border: 2px solid #fff; }
.pillar-nav-label { font-size: 0.76rem; font-weight: 800; }

/* ==========================================================================
   ASSESSMENT WIZARD
   ========================================================================== */
.assessment-container-card { background: transparent; box-shadow: none !important; padding: 8px 4px 24px; width: 100%; max-width: var(--max-width-app, 680px); margin: 0 auto; }
@media (min-width: 768px) { .assessment-container-card { max-width: var(--max-width-app, 680px); padding: 16px 8px 32px; } }

.wiz-top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.wiz-back { width: 42px; height: 42px; flex-shrink: 0; border-radius: 14px; border: 1.5px solid var(--border-subtle); background: #fff; color: var(--text-primary); cursor: pointer; display: grid; place-items: center; transition: border-color var(--transition-fast); }
.wiz-back:hover { border-color: var(--build); color: var(--build); }
.wiz-progress { flex: 1; display: flex; gap: 6px; }
.wiz-progress span { flex: 1; height: 6px; border-radius: 6px; background: var(--border-subtle); overflow: hidden; position: relative; }
.wiz-progress span.on::after { content: ""; position: absolute; inset: 0; background: var(--wiz-c, var(--grad-brand)); animation: fillIn 0.5s ease both; transform-origin: left; }
@keyframes fillIn { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.wiz-step { font-size: 0.78rem; font-weight: 800; color: var(--text-muted); white-space: nowrap; }

.wiz-hero { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.wiz-hero .i3d { flex-shrink: 0; }
.wiz-title { font-size: clamp(1.55rem, 5.6vw, 2rem); font-weight: 800; line-height: 1.12; margin: 6px 0 6px; }
.wiz-sub { color: var(--text-secondary); font-size: 0.98rem; margin: 0; }
.wiz-center { text-align: center; }
.wiz-center .wiz-hero { flex-direction: column; gap: 10px; }

/* Pinned above the floating nav so the next step is always one thumb-tap away. */
.wiz-footer {
  position: fixed; z-index: 50; left: 50%; transform: translateX(-50%);
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  width: min(var(--max-width-app, 680px), calc(100% - 24px));
  max-width: var(--max-width-app, 680px);
  display: flex; flex-direction: column; align-items: stretch; gap: 8px;
  padding: 18px 4px 6px;
  background: linear-gradient(to top, var(--bg-primary) 62%, rgba(248, 246, 251, 0));
}
.assessment-container-card { padding-bottom: 130px !important; }
body[data-view="assessment"] .bone-ai-fab, body[data-view="auth"] .bone-ai-fab { display: none; }
.wiz-footer .cta-btn { width: 100%; }
.wiz-count { align-self: center; display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: var(--radius-full); background: #fff; border: 1px solid var(--border-subtle); font-weight: 800; color: var(--text-muted); font-size: 0.8rem; box-shadow: var(--shadow-sm); transition: all var(--transition-fast); }
.wiz-count i { color: var(--border-medium); }
.wiz-count.on { color: var(--build); border-color: #F8C8D5; background: var(--build-bg); }
.wiz-count.on i { color: var(--build); }
.wiz-note { display: flex; align-items: center; gap: 8px; justify-content: center; text-align: center; font-size: 0.8rem; color: var(--text-muted); margin-top: 12px; }

/* Choice tiles (life assets, diet, region, activity, conditions, risks) */
.choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.choice-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 380px) { .choice-grid.cols-3 { grid-template-columns: repeat(2, 1fr); } }
.choice-tile {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  text-align: center; padding: 18px 10px 14px; min-height: 132px;
  background: #fff; border: 2px solid var(--border-subtle); border-radius: 22px; cursor: pointer;
  transition: transform var(--transition-bounce), border-color var(--transition-fast), box-shadow var(--transition-normal), background var(--transition-fast);
  box-shadow: var(--shadow-sm); font: inherit; color: inherit;
}
.choice-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.choice-tile:active { transform: scale(0.97); }
.choice-tile img { width: 58px; height: 58px; transition: transform var(--transition-bounce); }
.choice-tile:hover img { transform: scale(1.08) rotate(-4deg); }
.choice-tile b { font-family: var(--font-heading); font-size: 0.98rem; font-weight: 700; line-height: 1.2; color: var(--text-primary); }
.choice-tile small { font-size: 0.76rem; color: var(--text-muted); font-weight: 600; line-height: 1.25; }
.choice-tile .tick { position: absolute; top: 10px; right: 10px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border-medium); background: #fff; display: grid; place-items: center; color: transparent; font-size: 0.7rem; transition: all var(--transition-fast); }
.choice-tile.selected { border-color: var(--tile-c, var(--build)); background: var(--tile-bg, var(--build-bg)); box-shadow: 0 8px 22px -12px var(--tile-c, var(--build)); }
.choice-tile.selected .tick { background: var(--tile-c, var(--build)); border-color: var(--tile-c, var(--build)); color: #fff; animation: checkPop 0.35s ease; }
.choice-tile.selected img { animation: wiggle 0.5s ease; }
.choice-grid.protect { --tile-c: var(--protect); --tile-bg: var(--protect-bg); }
.choice-grid.strengthen { --tile-c: var(--strengthen); --tile-bg: var(--strengthen-bg); }

/* Row variant for checklists */
.choice-rows { display: flex; flex-direction: column; gap: 10px; }
.choice-row { display: flex; align-items: center; gap: 14px; background: #fff; border: 2px solid var(--border-subtle); border-radius: 18px; padding: 12px 14px; cursor: pointer; text-align: left; font: inherit; color: inherit; transition: border-color var(--transition-fast), background var(--transition-fast); }
.choice-row img { width: 40px; height: 40px; flex-shrink: 0; }
.choice-row b { flex: 1; font-weight: 700; font-size: 0.98rem; }
.choice-row .tick { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--border-medium); display: grid; place-items: center; color: transparent; font-size: 0.75rem; flex-shrink: 0; }
.choice-row.selected { border-color: var(--tile-c, var(--build)); background: var(--tile-bg, var(--build-bg)); }
.choice-row.selected .tick { background: var(--tile-c, var(--build)); border-color: var(--tile-c, var(--build)); color: #fff; animation: checkPop 0.35s ease; }
.choice-rows.protect { --tile-c: var(--protect); --tile-bg: var(--protect-bg); }
.choice-rows.strengthen { --tile-c: var(--strengthen); --tile-bg: var(--strengthen-bg); }

/* Baseline pill (height/weight) */
.baseline-pill { display: flex; align-items: center; gap: 12px; background: #fff; border: 1.5px solid var(--border-subtle); border-radius: 18px; padding: 10px 12px 10px 14px; margin-bottom: 16px; }
.baseline-pill .bp-stat { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 0.95rem; }
.baseline-pill .bp-stat i { color: var(--build); }
.baseline-pill .spacer { flex: 1; }

/* Plan overview pillars */
.pillar-stack { display: flex; flex-direction: column; gap: 12px; }
.pillar-row { display: flex; align-items: center; gap: 14px; background: #fff; border: 1.5px solid var(--border-subtle); border-radius: 20px; padding: 14px 16px; box-shadow: var(--shadow-sm); }
.pillar-row .i3d { width: 54px; height: 54px; flex-shrink: 0; }
.pillar-row h4 { font-size: 1.08rem; margin: 0 0 2px; }
.pillar-row p { margin: 0; font-size: 0.84rem; color: var(--text-muted); font-weight: 600; }
.pillar-row .num { margin-left: auto; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 0.85rem; color: #fff; flex-shrink: 0; }
.pillar-row.build .num { background: var(--build); }
.pillar-row.protect .num { background: var(--protect); }
.pillar-row.strengthen .num { background: var(--strengthen); }
.value-pills { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 4px 0 18px; }
.value-pills span { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1.5px solid var(--border-subtle); padding: 5px 12px 5px 6px; border-radius: var(--radius-full); font-weight: 700; font-size: 0.84rem; }
.value-pills img { width: 24px; height: 24px; }

/* 3-2-1 formula */
.formula { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 6px 0 16px; }
.formula-cell { background: #fff; color: var(--text-primary); border: 1.5px solid var(--border-subtle); border-radius: 22px; padding: 16px 8px 14px; text-align: center; box-shadow: var(--shadow-sm); }
.formula-num { font-family: var(--font-heading); font-size: 2.6rem; font-weight: 900; line-height: 1; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.formula-icons { display: flex; justify-content: center; margin: 8px 0 6px; min-height: 36px; }
.formula-icons img { width: 34px; height: 34px; margin-left: -8px; }
.formula-icons img:first-child { margin-left: 0; }
.formula-cell b { display: block; font-size: 0.86rem; }
.formula-cell small { display: block; font-size: 0.72rem; color: var(--text-muted); font-weight: 600; }
.food-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.food-chip { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1.5px solid var(--border-subtle); border-radius: var(--radius-full); padding: 5px 12px 5px 6px; font-weight: 700; font-size: 0.84rem; }
.food-chip img { width: 22px; height: 22px; }
.info-card { background: #fff; border: 1.5px solid var(--border-subtle); border-radius: 20px; padding: 16px; margin-bottom: 12px; }
.info-card h4 { font-size: 1rem; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.info-card h4 img { width: 28px; height: 28px; }

/* Risk gauge */
.gauge-card { background: #fff; border: 1.5px solid var(--border-subtle); border-radius: 24px; padding: 16px 18px; display: flex; align-items: center; gap: 16px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.gauge { position: relative; width: 132px; height: 76px; flex-shrink: 0; }
.gauge svg { width: 100%; height: 100%; overflow: visible; }
.gauge .needle { transform-origin: 66px 66px; transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1); }
.gauge-info b { font-family: var(--font-heading); font-size: 1.5rem; display: block; line-height: 1.1; }
.gauge-info span { font-size: 0.84rem; color: var(--text-secondary); }
.gauge-info .lvl { display: inline-block; margin-top: 6px; padding: 3px 12px; border-radius: var(--radius-full); color: #fff; font-weight: 800; font-size: 0.78rem; }

/* Rooms (protect) */
.room-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; margin-bottom: 8px; scrollbar-width: none; }
.room-tabs::-webkit-scrollbar { display: none; }
.room-tab-btn { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 76px; padding: 10px 8px 8px; background: #fff; border: 2px solid var(--border-subtle); border-radius: 18px; cursor: pointer; font-weight: 700; font-size: 0.76rem; color: var(--text-secondary); position: relative; font-family: inherit; }
.room-tab-btn img { width: 36px; height: 36px; }
.room-tab-btn.active { border-color: var(--protect); background: var(--protect-bg); color: var(--protect); }
.room-tab-btn .room-done { position: absolute; top: 4px; right: 6px; color: var(--success); font-size: 0.8rem; }
.qa-list { display: flex; flex-direction: column; gap: 10px; }
.qa-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff; border: 1.5px solid var(--border-subtle); border-radius: 16px; padding: 12px 12px 12px 16px; }
.qa-row span { font-weight: 700; font-size: 0.94rem; flex: 1; }
.yesno { display: flex; gap: 6px; flex-shrink: 0; }
.yesno button { min-width: 52px; height: 40px; padding: 0 12px; border-radius: 12px; border: 1.5px solid var(--border-medium); background: #fff; cursor: pointer; font-family: var(--font-heading); font-weight: 700; font-size: 0.88rem; color: var(--text-muted); transition: all var(--transition-fast); }
.yesno button.yes.on { background: var(--success); border-color: var(--success); color: #fff; animation: checkPop 0.3s ease; }
.yesno button.no.on { background: #FEF3C7; border-color: var(--warning); color: var(--warning); }
.home-score { background: var(--protect-bg); border-radius: 16px; padding: 12px 16px; margin-top: 14px; }
.home-score .hs-top { display: flex; justify-content: space-between; font-weight: 800; font-size: 0.86rem; color: var(--protect); margin-bottom: 8px; }
.bar { height: 8px; border-radius: 8px; background: rgba(74, 63, 122, 0.15); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 8px; background: var(--protect); transition: width 0.6s ease; }

/* ==========================================================================
   AUTH
   ========================================================================== */
.auth-card { max-width: 440px; margin: 10px auto 30px; background: #fff; border: 1px solid var(--border-subtle); border-radius: 28px; padding: 26px 22px; box-shadow: var(--shadow-lg); text-align: center; }
.auth-illus { position: relative; height: 150px; display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.auth-glow { position: absolute; width: 150px; height: 150px; border-radius: 50%; background: var(--grad-brand-soft); }
.auth-illus .i3d-xl { position: relative; z-index: 1; }
.auth-bubble { position: absolute; z-index: 2; top: 14px; right: calc(50% - 132px); background: var(--grad-brand); color: #fff; font-weight: 800; font-size: 0.76rem; padding: 6px 12px; border-radius: 14px 14px 14px 4px; box-shadow: var(--shadow-brand); animation: popIn 0.5s ease 0.4s both, floatY 3s ease-in-out 1s infinite; }
.auth-lock { position: absolute; z-index: 2; bottom: 10px; left: calc(50% - 100px); animation: floatY 3.4s ease-in-out infinite; }
.auth-title { font-size: 1.8rem; font-weight: 800; margin: 12px 0 6px; }
.auth-sub { color: var(--text-secondary); margin: 0 0 20px; }
.field-label { display: block; text-align: left; font-weight: 800; font-size: 0.86rem; margin-bottom: 8px; }
.phone-field { display: flex; align-items: center; border: 2px solid var(--border-subtle); border-radius: 16px; background: #fff; overflow: hidden; transition: border-color var(--transition-fast); }
.phone-field:focus-within { border-color: var(--build); }
.phone-cc { padding: 0 12px; font-weight: 800; color: var(--text-secondary); border-right: 1.5px solid var(--border-subtle); align-self: stretch; display: flex; align-items: center; background: var(--bg-card-hover); }
.phone-field input { flex: 1; border: none; outline: none; padding: 14px; font-size: 1.1rem; font-weight: 700; letter-spacing: 0.06em; background: transparent; color: var(--text-primary); min-width: 0; }
.consent-row { display: flex; align-items: flex-start; gap: 10px; text-align: left; font-size: 0.8rem; color: var(--text-secondary); margin: 14px 0 18px; cursor: pointer; }
.consent-row input { margin-top: 2px; width: 18px; height: 18px; accent-color: var(--build); flex-shrink: 0; }
.otp-sent-wrap { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.otp-sent-wrap .otp-sent { margin: 0; }
.btn-change-number { background: none; border: none; color: var(--build); font-family: inherit; font-size: 0.84rem; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: var(--radius-full); background: rgba(229, 48, 95, 0.08); transition: all var(--transition-fast); text-decoration: none; }
.btn-change-number:hover { background: rgba(229, 48, 95, 0.16); color: var(--brand-ruby); }
.otp-sent { font-weight: 700; color: var(--text-secondary); margin: 0 0 12px; }
.sms-sim-bubble { display: flex; align-items: center; gap: 10px; justify-content: center; background: #FEF3C7; color: #92400E; border-radius: 14px; padding: 10px 14px; font-size: 0.84rem; margin-bottom: 14px; }
.sms-sim-bubble b { letter-spacing: 0.15em; }
.otp-box-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 14px; }
.otp-digit-input { width: 100%; aspect-ratio: 1 / 1.15; text-align: center; font-family: var(--font-heading); font-size: 1.5rem; font-weight: 800; border: 2px solid var(--border-subtle); border-radius: 14px; background: #fff; color: var(--text-primary); outline: none; transition: border-color var(--transition-fast), transform var(--transition-fast); }
.otp-digit-input:focus { border-color: var(--build); transform: translateY(-2px); }
.otp-actions { display: flex; gap: 8px; justify-content: center; margin-bottom: 16px; }
.auth-card.shake { animation: wiggle 0.4s ease; }

/* ==========================================================================
   BUILD DASHBOARD
   ========================================================================== */
.seg-tabs { display: flex; gap: 6px; background: #fff; border: 1px solid var(--border-subtle); padding: 5px; border-radius: 18px; margin: 0 auto 16px; max-width: 420px; box-shadow: var(--shadow-sm); }
.seg-tab { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: none; background: none; padding: 10px 12px; border-radius: 14px; font-family: var(--font-heading); font-weight: 700; font-size: 0.98rem; color: var(--text-muted); cursor: pointer; transition: all var(--transition-normal); }
.seg-tab img { width: 24px; height: 24px; }
.seg-tab.active { background: var(--grad-brand); color: #fff; box-shadow: var(--shadow-brand); }

.today-hero { display: flex; align-items: center; gap: 18px; background: #fff; border: 1px solid var(--border-subtle); border-radius: 26px; padding: 18px; box-shadow: var(--shadow-md); margin-bottom: 16px; position: relative; overflow: hidden; }
.today-hero::before { content: ""; position: absolute; width: 220px; height: 220px; right: -70px; top: -90px; border-radius: 50%; background: var(--grad-brand-soft); }
.today-hero > * { position: relative; }
.today-hero-body { flex: 1; min-width: 0; }
.today-hero h2 { font-size: 1.3rem; font-weight: 800; margin: 6px 0 2px; line-height: 1.2; }
.today-hero p { margin: 0 0 10px; font-size: 0.88rem; color: var(--text-secondary); }
.hero-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.stat-pill { display: inline-flex; align-items: center; gap: 6px; background: var(--bg-card-hover); border: 1px solid var(--border-subtle); border-radius: var(--radius-full); padding: 4px 12px 4px 6px; font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); }
.stat-pill b { color: var(--text-primary); }
.stat-pill img { width: 20px; height: 20px; }
.stat-pill.fire { background: #FFF4E5; border-color: #FBD9A8; }
.hero-tier { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.past-tag { display: inline-flex; align-items: center; gap: 4px; background: var(--bg-surface-elevated); color: var(--text-muted); font-size: 0.7rem; font-weight: 800; padding: 3px 9px; border-radius: var(--radius-full); text-transform: uppercase; letter-spacing: 0.05em; vertical-align: middle; margin-left: 4px; font-family: var(--font-body); }
.past-tag.today { background: var(--build-bg); color: var(--build); }

/* Rings (shared) */
.score-ring, .timer-ring { position: relative; width: 120px; height: 120px; flex-shrink: 0; }
.score-ring svg, .timer-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: var(--bg-surface-elevated); stroke-width: 11; }
.ring-fill { fill: none; stroke-width: 11; stroke-linecap: round; stroke-dasharray: 326.73; stroke-dashoffset: calc(326.73 - (326.73 * var(--p, 0) / 100)); transition: stroke-dashoffset 1s cubic-bezier(0.16, 1, 0.3, 1); }
.score-ring-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.score-ring-label b { font-family: var(--font-heading); font-size: 2.1rem; font-weight: 900; line-height: 1; color: var(--text-primary); }
.score-ring-label span { font-size: 0.74rem; font-weight: 700; color: var(--text-muted); }
@media (max-width: 400px) { .score-ring { width: 100px; height: 100px; } .score-ring-label b { font-size: 1.75rem; } .today-hero { gap: 12px; padding: 14px; } }

.nutri-card { background: #fff; border: 1px solid var(--border-subtle); border-radius: 24px; padding: 16px; margin: 6px 0 16px; box-shadow: var(--shadow-sm); }
.nutri-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; gap: 8px; }
.nutri-head h3 { font-size: 1.05rem; margin: 0; }
.nutri-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 8px; }
@media (min-width: 720px) { .nutri-grid { grid-template-columns: repeat(6, 1fr); } }
.nutri { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.nutri-ring { --p: 0; --c: var(--build); width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 4px; background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--bg-surface-elevated) 0); transition: --p 0.8s ease; position: relative; }
.nutri-ring::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: #fff; }
.nutri-ring img { position: relative; width: 32px; height: 32px; }
.nutri-ring.full::after { content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; right: -2px; top: -2px; width: 20px; height: 20px; border-radius: 50%; background: var(--success); color: #fff; font-size: 0.6rem; display: grid; place-items: center; border: 2px solid #fff; animation: checkPop 0.35s ease; }
.nutri b { font-size: 0.8rem; font-weight: 800; }
.nutri span { font-size: 0.74rem; color: var(--text-muted); font-weight: 600; }
@property --p { syntax: "<number>"; inherits: true; initial-value: 0; }

/* Clinical Nutritional Guidance Banner */
.clinical-diet-banner {
  background: linear-gradient(135deg, #FFF5F7 0%, #FFFFFF 60%, #F5F7FF 100%);
  border: 1.5px solid #F3C4D4;
  border-radius: 20px;
  padding: 16px 18px;
  margin: 8px 0 16px;
  box-shadow: 0 4px 16px -4px rgba(229, 48, 95, 0.08);
}
.cdb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.cdb-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(120deg, #E5305F, #B1315D);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}
.cdb-conditions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}
.cdb-cond-chip {
  background: #fff;
  border: 1px solid #E5D5E8;
  color: var(--text-primary);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.cdb-edit-btn {
  background: #fff;
  border: 1px solid #E5D5E8;
  color: var(--brand-pink);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}
.cdb-edit-btn:hover {
  background: var(--build-bg);
  border-color: var(--build);
}
.cdb-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.cdb-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin-bottom: 12px;
}
.cdb-tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}
.cdb-tip-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.3;
}
.cdb-tip-item i {
  color: var(--build);
  margin-top: 2px;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.meal-clinical-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 4px 10px;
  background: #F7F3FA;
  border: 1px solid #E9E1F0;
  border-radius: 10px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #4A3F7A;
}
.meal-clinical-badge i {
  color: var(--build);
}

/* Protect Precaution Suggestion Card (Light Panel with Navy Blue #332D4B Elements) */
.protect-suggestion-card {
  position: relative;
  background: linear-gradient(135deg, #F8F6FD 0%, #EEECF7 100%);
  border: 1.5px solid #D8D2E6;
  border-radius: 20px;
  padding: 16px 18px;
  margin: 8px 0 16px;
  box-shadow: 0 4px 18px rgba(51, 45, 75, 0.08);
  overflow: hidden;
}
.protect-suggestion-card .psc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.protect-suggestion-card .psc-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #332D4B;
  border: 1px solid #332D4B;
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 8px rgba(51, 45, 75, 0.25);
}
.protect-suggestion-card .psc-close-btn {
  background: none;
  border: none;
  color: #7A7094;
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}
.protect-suggestion-card .psc-close-btn:hover {
  background: rgba(51, 45, 75, 0.08);
  color: #332D4B;
}
.protect-suggestion-card .psc-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.protect-suggestion-card .psc-title {
  font-family: var(--font-heading);
  font-size: 1.02rem;
  font-weight: 800;
  color: #332D4B;
  margin: 0 0 4px;
  letter-spacing: -0.2px;
}
.protect-suggestion-card .psc-desc {
  font-size: 0.84rem;
  color: #554D6B;
  line-height: 1.45;
  margin: 0;
}
.protect-suggestion-card .psc-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.protect-suggestion-card .psc-cta {
  padding: 8px 18px;
  font-size: 0.86rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #332D4B 0%, #25203B 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(51, 45, 75, 0.35);
  width: auto;
  min-height: auto;
  border: none;
}
.protect-suggestion-card .psc-cta:hover {
  background: linear-gradient(135deg, #423B5E 0%, #332D4B 100%);
  transform: translateY(-1px);
}
.protect-suggestion-card .psc-later {
  padding: 6px 14px;
  font-size: 0.82rem;
  color: #332D4B;
  background: #FFFFFF;
  border: 1.5px solid #D5CEE4;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}
.protect-suggestion-card .psc-later:hover {
  background: #E8E3F4;
  color: #25203B;
  border-color: #BDB4D3;
}

/* Protect Safety Risk Analysis & Post-Completion Action Suggestions */
.protect-safety-summary-card {
  margin-top: 16px;
  border-radius: 20px;
  padding: 20px;
  background: #FFFFFF;
  border: 1.5px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}
.psa-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.psa-title-group h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 1.12rem;
  font-weight: 800;
  color: #332D4B;
  margin: 0;
}
.psa-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 4px 0 0;
}
.psa-risk-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.psa-risk-badge.safe {
  background: #EAF8F0;
  color: #1E9E62;
  border: 1.5px solid #A7E3C5;
}
.psa-risk-badge.warn {
  background: #FEF6EB;
  color: #D97706;
  border: 1.5px solid #FCD39A;
}
.psa-risk-badge.danger {
  background: #FDF0F0;
  color: #DC2626;
  border: 1.5px solid #FCA5A5;
}
.psa-score-bar-card {
  background: #F8F6FB;
  border: 1.5px solid #E8E3F2;
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 18px;
}
.psa-score-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.psa-score-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.88rem;
  color: #332D4B;
}
.psa-score-val {
  font-size: 0.88rem;
  font-weight: 600;
  color: #433D5A;
}
.psa-progress-track {
  width: 100%;
  height: 10px;
  background: #E7E3EE;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 8px;
}
.psa-progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}
.psa-risk-desc {
  font-size: 0.84rem;
  color: #554D6B;
  margin: 0;
  line-height: 1.4;
}
.psa-subheading {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  color: #332D4B;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
}
.psa-count-pill {
  font-size: 0.72rem;
  padding: 2px 8px;
  background: #FEF2F2;
  color: #DC2626;
  border-radius: var(--radius-full);
  font-weight: 700;
}
.psa-room-hazard-card {
  background: #FFFDFB;
  border: 1.5px solid #F6DBC8;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.psa-rh-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.psa-rh-head div {
  display: flex;
  flex-direction: column;
}
.psa-rh-head b {
  font-size: 0.9rem;
  color: #332D4B;
}
.psa-rh-head span {
  font-size: 0.76rem;
  color: #DC2626;
  font-weight: 600;
}
.psa-fix-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.psa-fix-item {
  background: #FFFFFF;
  border: 1px solid #EFEAE3;
  border-radius: 10px;
  padding: 10px 12px;
}
.psa-hazard-issue {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-weight: 700;
  font-size: 0.84rem;
  color: #B91C1C;
  margin-bottom: 4px;
}
.psa-hazard-solution {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.82rem;
  color: #332D4B;
  line-height: 1.4;
  background: #F8F6FD;
  padding: 6px 10px;
  border-radius: 8px;
  margin-top: 4px;
}
.psa-all-safe-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #F0FDF4;
  border: 1.5px solid #BBF7D0;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
  color: #166534;
}
.psa-all-safe-banner p {
  margin: 2px 0 0;
  font-size: 0.82rem;
  color: #15803D;
}
.psa-incomplete-prompt {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #F8F6FD;
  border: 1.5px dashed #D8D2E6;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 0.84rem;
  color: #554D6B;
}
.psa-suggestions-section {
  margin-top: 16px;
}
.psa-suggestions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.psa-suggestion-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #F9F8FC;
  border: 1.5px solid #EBE7F4;
  border-radius: 14px;
  padding: 12px 14px;
}
.psa-suggestion-card h5 {
  font-size: 0.88rem;
  font-weight: 700;
  color: #332D4B;
  margin: 0 0 3px;
}
.psa-suggestion-card p {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.35;
}
.psa-actions-footer {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1.5px solid #EFEBF5;
}

.meal-slot-filter-strip { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin-bottom: 4px; scrollbar-width: none; }
.meal-slot-filter-strip::-webkit-scrollbar { display: none; }
.slot-filter-pill { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; border-radius: var(--radius-full); padding: 7px 14px; background: #fff; border: 1.5px solid var(--border-subtle); font-weight: 700; font-size: 0.84rem; color: var(--text-secondary); cursor: pointer; }
.slot-filter-pill img { width: 18px; height: 18px; }
.slot-filter-pill.active { background: var(--brand-navy); border-color: var(--brand-navy); color: #fff; }

/* Meal cards */
.meal-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #fff;
  border: 1.5px solid var(--border-subtle);
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}
.meal-card:hover {
  box-shadow: var(--shadow-md);
}
.meal-card.completed {
  border-color: #F8C8D5;
  background: linear-gradient(135deg, #FFF7F9, #fff 75%);
}

/* Meal Card Header */
.meal-head {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}
.meal-ico {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 14px;
  background: var(--grad-brand-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: var(--brand-pink);
}
.meal-ico-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.meal-head-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.meal-head-text b {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text-primary);
  line-height: 1.25;
}
.meal-head-text span {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.meal-head-nav {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.mini-nav {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--border-subtle);
  background: #fff;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}
.mini-nav:hover {
  border-color: var(--brand-pink);
  color: var(--brand-pink);
  background: #FFF7F9;
  transform: scale(1.05);
}
.meal-check, .check-btn {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  border: 2px solid var(--border-medium);
  background: #fff;
  color: var(--border-medium);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
  margin-left: 2px;
  transition: all var(--transition-bounce);
}
.meal-check:hover, .check-btn:hover {
  border-color: var(--brand-pink);
  color: var(--brand-pink);
}
.meal-card.completed .meal-check,
.meal-card.completed .check-btn {
  background: var(--grad-brand);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--shadow-brand);
}
.meal-card.just-done .meal-check,
.meal-card.just-done .check-btn {
  animation: checkPop 0.35s ease;
}
.meal-check.locked, .check-btn.locked {
  cursor: not-allowed;
  opacity: 0.55;
}

/* Meal Items (Dishes / Components) */
.meal-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding-top: 10px;
  border-top: 1px dashed var(--border-subtle);
}
.meal-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: #F9F8FC;
  border: 1px solid rgba(226, 223, 236, 0.6);
  transition: background var(--transition-fast), border-color var(--transition-fast);
}
.meal-item:hover {
  background: #F4F2F9;
  border-color: #DBD7E8;
}
.meal-item.swapped {
  background: #F0FBF6;
  border-color: #BBE7D4;
}
.mi-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.mi-text b {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  word-break: break-word;
}
.mi-text span {
  font-size: 0.76rem;
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  line-height: 1.4;
}
.mi-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  font-style: normal;
  background: #EDE8F5;
  color: var(--brand-navy);
  white-space: nowrap;
}
.mi-tag i {
  font-size: 0.68rem;
  color: var(--brand-pink);
}
.mi-opt {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--border-subtle);
  background: #fff;
  color: var(--brand-pink);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all var(--transition-fast);
}
.mi-opt:hover {
  background: #FFF0F4;
  border-color: #F8C8D5;
  color: #D11D4E;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(229, 48, 95, 0.15);
}
.mi-opt i {
  font-size: 0.7rem;
  transition: transform var(--transition-fast);
}
.mi-opt:hover i {
  transform: translateX(2px);
}

.mi-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.meal-item-check {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  border: 2px solid #D5D0DF;
  background: #fff;
  color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.meal-item-check:hover {
  border-color: var(--brand-pink);
  background: #FFF5F7;
  transform: scale(1.06);
}
.meal-item-check.checked {
  background: var(--grad-brand);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--shadow-brand);
  animation: checkPop 0.35s ease;
}
.meal-item-check.locked {
  cursor: not-allowed;
  opacity: 0.55;
  color: #8C827A;
  border-color: #E2DFEC;
}
.meal-item.item-completed {
  background: #F0FBF6;
  border-color: #BBE7D4;
}
.meal-item.item-completed .mi-text b {
  color: #1A754C;
}

/* Item Options Modal Rows */
.opt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 8px;
  background: #fff;
  border: 1.5px solid var(--border-subtle);
  border-radius: 14px;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.opt-row:hover {
  background: #FFF7F9;
  border-color: #F8C8D5;
  transform: translateY(-1px);
}
.opt-nutri {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--build-bg);
  color: var(--build);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

/* Legacy single-dish meal compatibility */
.meal-card .meal-art { width: 56px; height: 56px; flex-shrink: 0; border-radius: 18px; background: var(--grad-brand-soft); display: grid; place-items: center; }
.meal-card .meal-art img { width: 40px; height: 40px; }
.meal-body { flex: 1; min-width: 0; }
.meal-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.meal-slot-name { font-family: var(--font-heading); font-weight: 800; font-size: 1.02rem; }
.meal-time { font-size: 0.74rem; color: var(--text-muted); font-weight: 700; }
.meal-dish { font-weight: 600; font-size: 0.92rem; margin: 4px 0 8px; color: var(--text-secondary); line-height: 1.35; }
.meal-card.completed .meal-dish { color: var(--text-muted); }
.meal-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.nchip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: var(--radius-full); font-size: 0.72rem; font-weight: 800; }
.nchip.ca { background: var(--build-bg); color: var(--build); }
.nchip.pro { background: var(--strengthen-bg); color: var(--strengthen); }
.nchip.swapped { background: var(--protect-bg); color: var(--protect); }
.meal-actions { display: flex; gap: 6px; margin-left: auto; }
.round-btn { width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--border-subtle); background: #fff; color: var(--text-secondary); cursor: pointer; display: grid; place-items: center; font-size: 0.8rem; transition: all var(--transition-fast); }
.round-btn:hover { border-color: var(--build); color: var(--build); }
.swap-link { background: none; border: none; color: var(--build); font-weight: 800; font-size: 0.78rem; cursor: pointer; padding: 3px 4px; display: inline-flex; align-items: center; gap: 4px; }

.tips-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0 10px; }
@media (max-width: 520px) { .tips-row { grid-template-columns: 1fr; } }
.tip-card, .ask-ai-card { display: flex; align-items: center; gap: 12px; background: #fff; border: 1.5px solid var(--border-subtle); border-radius: 20px; padding: 12px 14px; }
.tip-card b, .ask-ai-card b { display: block; font-size: 0.92rem; }
.tip-card span, .ask-ai-card span { font-size: 0.8rem; color: var(--text-muted); }
.ask-ai-card { cursor: pointer; margin-bottom: 12px; background: linear-gradient(120deg, #F3EEFA, #FDECF1); border-color: transparent; }
.ask-ai-card > div { flex: 1; }
.ask-ai-card > i { color: var(--build); }

/* Calendar: Minimalist, modern, proportional week strip (Image 3 fix) */
.calendar-date-nav-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; gap: 8px; }
.calendar-month-heading { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-heading); font-weight: 700; font-size: 0.94rem; color: var(--text-primary); letter-spacing: -0.01em; }
.calendar-month-heading img { width: 19px; height: 19px; }
.calendar-nav-controls { display: inline-flex; align-items: center; gap: 5px; }
.cal-nav-btn { width: 28px; height: 28px; border-radius: var(--radius-full); background: #FFFFFF; border: 1.5px solid var(--border-subtle); color: var(--text-secondary); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 0.68rem; transition: all var(--transition-fast); }
.cal-nav-btn:hover { background: var(--bg-surface-elevated); color: var(--text-primary); border-color: var(--border-medium); }
.cal-today-pill { height: 28px; padding: 0 12px; border-radius: var(--radius-full); background: var(--brand-navy); color: #FFFFFF; font-family: var(--font-body); font-size: 0.74rem; font-weight: 700; border: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: all var(--transition-fast); }
.cal-today-pill:hover { background: #231E35; }
.calendar-day-selector { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; padding: 4px 1px 8px 1px; margin-bottom: 12px; }
.calendar-day-btn { flex: 1; min-width: 44px; background: #FFFFFF; border: 1.5px solid var(--border-subtle); border-radius: 14px; padding: 7px 3px 6px 3px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; cursor: pointer; transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1); text-align: center; position: relative; box-shadow: 0 1px 3px rgba(42, 37, 64, 0.03); }
.calendar-day-btn:hover:not(.active) { border-color: var(--border-medium); background: #FAF9FC; transform: translateY(-1px); }
.calendar-day-btn .day-abbr { font-size: 0.63rem; font-weight: 700; color: #8C86A0; letter-spacing: 0.4px; text-transform: uppercase; line-height: 1.1; }
.calendar-day-btn .day-date-number { font-family: var(--font-heading); font-size: 1.05rem; font-weight: 800; color: var(--text-primary); line-height: 1.15; margin: 1px 0 0; }
.calendar-day-btn .day-status-pill { font-size: 0.62rem; font-weight: 700; color: #B4AECA; display: flex; align-items: center; justify-content: center; min-height: 10px; line-height: 1; }
.calendar-day-btn .status-dot { font-size: 0.72rem; line-height: 1; color: #C8C3D8; }
.calendar-day-btn .status-check { font-size: 0.64rem; font-weight: 900; color: var(--success); }
.calendar-day-btn .status-count { font-size: 0.56rem; font-weight: 700; color: var(--build); }
.calendar-day-btn.is-today:not(.active) { border-color: #D6D0E3; background: #FFFFFF; }
.calendar-day-btn.is-today:not(.active) .day-abbr { color: var(--build); font-weight: 800; }
.calendar-day-btn.is-today:not(.active) .day-date-number { color: var(--text-primary); }
.calendar-day-btn.active { background: var(--brand-navy) !important; border-color: var(--brand-navy) !important; color: #FFFFFF !important; box-shadow: 0 4px 14px rgba(51, 45, 75, 0.20) !important; transform: translateY(-1px); }
.calendar-day-btn.active .day-abbr { color: #D5CEE8 !important; font-weight: 700 !important; }
/* Today reads "TODAY" in place of the weekday. */
.calendar-day-btn.is-today.active .day-abbr { color: #FFB3CB !important; font-weight: 800 !important; }
.calendar-day-btn.active .day-date-number { color: #FFFFFF !important; font-weight: 800 !important; }
.calendar-day-btn.active .day-status-pill, .calendar-day-btn.active .status-dot { color: #FFFFFF !important; opacity: 0.85; }
.calendar-day-btn.active .status-check { color: #55E8A3 !important; }
.calendar-day-btn.active .status-count { color: #FFD4E2 !important; }
.calendar-day-btn.day-completed:not(.active) { border-color: #C8EBD8; background: #F4FBF7; }
.calendar-day-btn.day-completed:not(.active) .day-status-pill { color: var(--success); }

/* Exercise */
.coach-selector-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.coach-label { font-weight: 800; font-size: 0.86rem; display: inline-flex; align-items: center; gap: 6px; }
.coach-label i { color: var(--build); }
.coach-pill-toggle { display: flex; background: #fff; border: 1px solid var(--border-subtle); padding: 4px; border-radius: var(--radius-full); gap: 4px; }
.coach-btn { border: none; background: none; padding: 7px 14px; border-radius: var(--radius-full); font-weight: 700; font-size: 0.84rem; color: var(--text-muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.coach-btn.active { background: var(--brand-navy); color: #fff; }
.today-hero.exercise .i3d-lg { width: 84px; height: 84px; }

.ex-card { background: #fff; border: 1.5px solid var(--border-subtle); border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; transition: border-color var(--transition-fast); }
.ex-card.completed { border-color: #F8C8D5; }
.ex-media { position: relative; height: 280px; background: #EEEEEE; cursor: pointer; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.ex-media video { width: 100%; height: 100%; aspect-ratio: 3 / 4; object-fit: contain; object-position: center; display: block; background: #EEEEEE; border: none !important; outline: none !important; }
.ex-play { position: absolute; right: 12px; bottom: 12px; pointer-events: none; }
.ex-play span { width: 48px; height: 48px; border-radius: 50%; background: rgba(255, 255, 255, 0.92); color: var(--build); display: grid; place-items: center; font-size: 1.2rem; box-shadow: var(--shadow-float); animation: pulseRing 2s infinite; }
.ex-dur { position: absolute; top: 10px; left: 10px; background: rgba(255, 255, 255, 0.92); color: var(--text-primary); padding: 4px 10px; border-radius: var(--radius-full); font-size: 0.74rem; font-weight: 800; display: inline-flex; gap: 5px; align-items: center; }
.ex-done-badge { position: absolute; top: 10px; right: 10px; background: var(--success); color: #fff; padding: 4px 10px; border-radius: var(--radius-full); font-size: 0.74rem; font-weight: 800; }
.ex-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ex-body h3 { font-size: 1.12rem; margin: 0; }
.ex-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ex-tag { display: inline-flex; align-items: center; gap: 5px; background: var(--bg-card-hover); border: 1px solid var(--border-subtle); padding: 3px 9px; border-radius: var(--radius-full); font-size: 0.74rem; font-weight: 700; color: var(--text-secondary); }
.ex-tag i { color: var(--build); }
.ex-why { font-size: 0.84rem; color: var(--text-secondary); }
.ex-why summary { cursor: pointer; font-weight: 800; color: var(--build); list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.ex-why summary::-webkit-details-marker { display: none; }
.ex-why p { margin: 6px 0 0; line-height: 1.45; }
.ex-why ol { margin: 6px 0 0 18px; line-height: 1.5; }
.ex-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 4px; }
.ex-actions .cta-btn { flex: 1; min-height: 44px; padding: 10px 16px; font-size: 0.94rem; }

/* ==========================================================================
   PROTECT / STRENGTHEN HUBS
   ========================================================================== */
.pillar-hero { display: flex; align-items: center; gap: 16px; border-radius: 26px; padding: 18px; margin-bottom: 16px; color: #fff; position: relative; overflow: hidden; box-shadow: var(--shadow-lg); }
.pillar-hero.protect { background: linear-gradient(130deg, #2A2540, #4A3F7A 70%, #6A5DA8); }
.pillar-hero.strengthen { background: linear-gradient(130deg, #6B2A5C, #8E2C6A 60%, #B1315D); }
.pillar-hero::after { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; right: -60px; bottom: -110px; background: rgba(255, 255, 255, 0.08); }
.pillar-hero > div { flex: 1; min-width: 0; position: relative; z-index: 1; }
.pillar-hero h2 { color: #fff; font-size: 1.4rem; margin: 6px 0 2px; }
.pillar-hero p { margin: 0; color: rgba(255, 255, 255, 0.82); font-size: 0.9rem; }
.pillar-hero .step-chip { background: rgba(255, 255, 255, 0.16); color: #fff; }
.risk-tag { flex: 0 0 auto !important; text-align: center; background: rgba(255, 255, 255, 0.14); border-radius: 16px; padding: 10px 12px; }
.risk-tag span { display: block; font-family: var(--font-heading); font-weight: 800; font-size: 1.05rem; }
.risk-tag small { font-size: 0.7rem; opacity: 0.8; font-weight: 700; }
@media (max-width: 480px) { .risk-tag { display: none; } }

.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h3 { font-size: 1.12rem; margin: 0; display: flex; align-items: center; gap: 8px; }
.card-head h3 img { width: 28px; height: 28px; }
.card-head-actions { display: flex; gap: 8px; }
#view-protect .glass-card, #view-strengthen .glass-card { margin-bottom: 16px; border-radius: 24px; padding: 18px; }

.doc-row { display: flex; align-items: center; gap: 12px; background: #fff; border: 1.5px solid var(--border-subtle); border-radius: 16px; padding: 10px 14px; cursor: pointer; text-align: left; font: inherit; color: inherit; width: 100%; transition: border-color var(--transition-fast), background var(--transition-fast); }
.doc-row img { width: 34px; height: 34px; flex-shrink: 0; }
.doc-row span { flex: 1; font-weight: 700; font-size: 0.94rem; }
.doc-row .tick { flex: 0 0 26px; width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--border-medium); display: grid; place-items: center; color: transparent; font-size: 0.75rem; flex-shrink: 0; }
.doc-row.selected { border-color: var(--strengthen); background: var(--strengthen-bg); }
.doc-row.selected .tick { background: var(--strengthen); border-color: var(--strengthen); color: #fff; animation: checkPop 0.35s ease; }

.tscore-scale { display: grid; grid-template-columns: 1fr 1fr 1fr; border-radius: 16px; overflow: hidden; margin-bottom: 14px; }
.tscore-zone { padding: 12px 8px; text-align: center; color: #fff; }
.tscore-zone b { display: block; font-size: 0.86rem; }
.tscore-zone span { font-size: 0.72rem; opacity: 0.9; font-weight: 700; }
.tscore-zone.danger { background: #B1315D; }
.tscore-zone.warn { background: #D97706; }
.tscore-zone.ok { background: #1E9E62; }
.dxa-list { display: flex; flex-direction: column; gap: 8px; }
.dxa-item { display: flex; gap: 12px; align-items: flex-start; border-left: 4px solid var(--dxa-c, var(--success)); background: var(--bg-card-hover); border-radius: 0 14px 14px 0; padding: 10px 14px; }
.dxa-item b { display: block; font-size: 0.94rem; }
.dxa-item p { margin: 2px 0 0; font-size: 0.82rem; color: var(--text-secondary); }

/* ==========================================================================
   MODALS / SHEETS
   ========================================================================== */
.modal-card.sheet { padding: 20px; border-radius: 26px; max-height: 90vh; display: flex; flex-direction: column; }
.modal-card.sheet-sm { max-width: 420px; padding: 22px; border-radius: 26px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.sheet-head h3 { font-size: 1.3rem; margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sheet-head h3 img { width: 28px; height: 28px; }
.sheet-scroll { flex: 1; overflow-y: auto; min-height: 120px; max-height: 52vh; padding-right: 4px; }
.sheet-actions { display: flex; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border-subtle); }
.sheet-actions > * { flex: 1; }
.modal-close-btn { width: 38px; height: 38px; border-radius: 12px; border: 1.5px solid var(--border-subtle); background: #fff; cursor: pointer; display: grid; place-items: center; color: var(--text-secondary); flex-shrink: 0; }
.search-field { position: relative; margin-bottom: 10px; }
.search-field i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 0.85rem; }
.search-field input { width: 100%; padding: 11px 14px 11px 38px; border-radius: var(--radius-full); border: 1.5px solid var(--border-subtle); font-size: 0.92rem; outline: none; background: var(--bg-card-hover); color: var(--text-primary); }
.search-field input:focus { border-color: var(--build); }
.pill-scroll { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.pill-scroll::-webkit-scrollbar { display: none; }
.filter-pill { flex-shrink: 0; display: inline-flex; align-items: center; gap: 5px; }
.filter-pill img { width: 16px; height: 16px; }
.filter-pill.active { background: var(--brand-navy) !important; color: #fff !important; border-color: var(--brand-navy) !important; }
.swap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.report-title { display: flex; align-items: center; gap: 12px; }
.report-title h3 { margin: 0 0 4px; }
.report-disclaimer { font-size: 0.8rem; color: var(--text-muted); margin: 0 0 12px; display: flex; gap: 6px; align-items: center; }
.range-row { margin-bottom: 18px; }
.range-label { display: flex; justify-content: space-between; margin-bottom: 8px; font-weight: 700; }
.range-label span i { color: var(--build); margin-right: 4px; }
.range-label b { color: var(--build); }
.slider-input { width: 100%; accent-color: var(--brand-pink); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pref-input-box { margin-bottom: 0; }
.pref-pill { display: inline-flex; align-items: center; gap: 6px; }
.pref-pill img { width: 18px; height: 18px; }
.pref-pill.active { background: var(--build-bg) !important; border-color: var(--build) !important; color: var(--build) !important; }
.profile-data-actions { display: flex; justify-content: space-between; margin-top: 10px; }
.privacy-note { text-align: center; font-size: 0.76rem; color: var(--text-muted); margin: 6px 0 0; }

/* Timer */
.timer-card { max-width: 440px; width: 94%; text-align: center; padding: 22px 18px; border-radius: 28px; }
.timer-close { position: absolute; top: 14px; right: 14px; }
.timer-title { font-size: 1.35rem; margin: 8px 0 2px; }
.timer-sub { font-size: 0.8rem; color: var(--text-muted); margin: 0 0 10px; }
.modal-workout-video-wrap { width: 100%; max-width: 320px; height: 320px; max-height: 44vh; background: #EEEEEE; border-radius: 20px; overflow: hidden; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }
.modal-workout-video-wrap video, .modal-workout-video-wrap img { width: 100%; height: 100%; aspect-ratio: 3 / 4; object-fit: contain; object-position: center; background: #EEEEEE; border: none !important; outline: none !important; }
.timer-ring { margin: 4px auto 12px; width: 132px; height: 132px; }
.timer-count { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-heading); font-size: 2rem; font-weight: 900; font-variant-numeric: tabular-nums; color: var(--text-primary); }
.timer-ring .ring-fill { transition: stroke-dashoffset 0.95s linear; }
.timer-actions { display: flex; gap: 10px; justify-content: center; }
.timer-actions .cta-btn { min-width: 160px; }
.timer-done { margin-top: 8px; }

/* ==========================================================================
   CHAT
   ========================================================================== */
.bone-ai-fab { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); right: 16px; padding: 6px 16px 6px 6px; gap: 8px; background: var(--grad-brand); border: none; font-family: var(--font-heading); font-weight: 700; }
.bone-ai-fab img { width: 38px; height: 38px; background: #fff; border-radius: 50%; padding: 3px; }
.fab-label { color: #fff; font-size: 0.92rem; }
@media (max-width: 480px) { .bone-ai-fab .fab-label { display: none; } .bone-ai-fab { padding: 6px; } }
.chat-header { background: var(--grad-brand); }
.chat-header-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.chat-header-id > div:last-child { min-width: 0; }
.chat-header-id small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-header h4 { color: #fff; margin: 0; font-size: 1.08rem; }
.chat-header small { color: rgba(255, 255, 255, 0.85); font-weight: 600; font-size: 0.74rem; }
.chat-header-actions { display: flex; gap: 6px; }
.chat-bot-avatar { background: #fff; display: grid; place-items: center; }
.chat-bot-avatar img { width: 30px; height: 30px; }
.chat-disclaimer { font-size: 0.7rem; color: var(--text-muted); text-align: center; margin: 0; padding: 4px 8px 8px; background: #fff; }
.chat-bubble.user { background: var(--brand-navy); }

/* Ojas AI assistant */
.bone-ai-fab img[src$=".svg"] { padding: 0; background: none; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85); }
.chat-bot-avatar { overflow: hidden; }
.chat-bot-avatar img[src$=".svg"] { width: 100%; height: 100%; }
.ai-badge { display: inline-block; vertical-align: 2px; margin-left: 4px; padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.22); color: #fff; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.06em; }
.chat-lang { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 4px 0 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.18); color: #fff; font-size: 0.8rem; cursor: pointer; }
.chat-lang select { appearance: none; -webkit-appearance: none; border: 0; background: transparent; color: #fff; font: 700 0.78rem var(--font-body); padding: 0 6px 0 2px; max-width: 86px; cursor: pointer; outline: none; }
.chat-lang select option { color: var(--text-primary); }
.chat-lang:focus-within { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.7); }
.chat-bubble p { margin: 0 0 6px; }
.chat-bubble p:last-child { margin-bottom: 0; }
.chat-bubble ul, .chat-bubble ol { margin: 2px 0 6px; padding-left: 18px; }
.chat-bubble ul:last-child, .chat-bubble ol:last-child { margin-bottom: 0; }
.chat-bubble li { margin: 2px 0; }
.chat-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; max-width: 88%; }
.chat-action-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1.5px solid var(--strengthen); background: #fff; color: var(--strengthen); font: 700 0.8rem var(--font-body); cursor: pointer; transition: background var(--transition-fast), color var(--transition-fast); }
.chat-action-btn:hover, .chat-action-btn:focus-visible { background: var(--strengthen); color: #fff; }
.bone-chat-drawer.is-busy .chat-send-btn { opacity: 0.5; pointer-events: none; }
.chat-input-bar input:disabled { background: var(--bg-surface-elevated, #F6F4F8); }

/* Toast drops in under the header so it never covers the primary button. */
.toast-notification { width: max-content; border-radius: 16px; top: calc(72px + env(safe-area-inset-top, 0px)); bottom: auto; transform: translateX(-50%) translateY(-12px); opacity: 0; pointer-events: none; transition: opacity 0.25s ease, transform 0.25s ease; background: var(--brand-navy); max-width: calc(100% - 32px); z-index: 100200; }
.toast-notification.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ==========================================================================
   RESPONSIVE / ACCESSIBILITY / PRINT
   ========================================================================== */
@media (max-width: 600px) {
  .hide-mobile { display: none !important; }
  .header-logo-img { height: 32px; }
  .app-container { padding: 0 14px; }
  .choice-tile { min-height: 118px; padding: 16px 8px 12px; }
  .choice-tile img { width: 50px; height: 50px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .pop, .fade-up { opacity: 1; }
  .orbit-icon { animation: none; }
}

@media print {
  .app-header, .pillar-bottom-nav, .bone-ai-fab, .bone-chat-drawer, .toast-notification, .splash, .onboarding-tour-overlay, .seg-tabs, .card-head-actions, .sheet-actions, .modal-close-btn { display: none !important; }
  body { background: #fff !important; }
  .pillar-hero { color: #000; background: none !important; box-shadow: none; border: 1px solid #ccc; }
  .pillar-hero h2, .pillar-hero p { color: #000; }
}

/* --------------------------------------------------------------------------
   Printable documents (BoneApp.printDocument): A4, document style.
   Only #printDoc prints; page margins come from the repeating table
   header/footer so the browser's own URL/date header is left out.
   -------------------------------------------------------------------------- */
.print-doc { display: none; }
@media print {
  @page { size: A4; margin: 0; }
  html:has(> body.printing-doc) { background: #fff !important; }
  body.printing-doc { background: #fff !important; padding: 0 !important; margin: 0 !important; min-height: 0 !important; }
  body.printing-doc > *:not(#printDoc) { display: none !important; }
  body.printing-doc #printDoc { display: block; }
}
.print-doc { --pd-ink: #231F33; --pd-muted: #6B6580; --pd-rule: #E4E0EA; --pd-accent: #8E2C6A; --pd-soft: #F8F5F9;
  color: var(--pd-ink); font-family: var(--font-body); font-size: 10.5pt; line-height: 1.45;
  -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.print-doc .pd-page { width: 100%; border-collapse: collapse; }
.print-doc .pd-page > thead > tr > td,
.print-doc .pd-page > tfoot > tr > td,
.print-doc .pd-page > tbody > tr > td { padding: 0 16mm; }
.print-doc .pd-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9mm 0 3mm; border-bottom: 2px solid var(--pd-accent); margin-bottom: 5mm; }
.print-doc .pd-head img { width: 30mm; height: auto; }
.print-doc .pd-head-meta { text-align: right; }
.print-doc .pd-head-meta b { display: block; font-family: var(--font-heading); font-size: 10pt; letter-spacing: 0.06em; text-transform: uppercase; color: var(--pd-accent); }
.print-doc .pd-head-meta span { font-size: 8.5pt; color: var(--pd-muted); }
.print-doc .pd-foot { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--pd-rule); margin-top: 5mm; padding: 3mm 0 8mm; font-size: 8pt; color: var(--pd-muted); }
.print-doc .pd-title { font-family: var(--font-heading); font-size: 21pt; font-weight: 700; margin: 0 0 1mm; letter-spacing: -0.01em; }
.print-doc .pd-intro { margin: 0 0 6mm; color: var(--pd-muted); }
.print-doc .pd-sec { margin: 0 0 5.5mm; break-inside: avoid; page-break-inside: avoid; }
/* Long tables may continue on the next page (their header row repeats). */
.print-doc .pd-sec.flow { break-inside: auto; page-break-inside: auto; }
.print-doc .pd-sec h2 { display: flex; align-items: center; gap: 2.5mm; font-family: var(--font-heading); font-size: 12.5pt; font-weight: 700; margin: 0 0 3mm; padding-bottom: 1.5mm; border-bottom: 1px solid var(--pd-rule); break-after: avoid; }
.print-doc .pd-sec h2 span { display: inline-grid; place-items: center; width: 6mm; height: 6mm; border-radius: 50%; background: var(--pd-accent); color: #fff; font-size: 8.5pt; }
.print-doc .pd-h3 { font-family: var(--font-heading); font-size: 10.5pt; margin: 4.5mm 0 2mm; }
.print-doc .pd-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 0 8mm; margin: 0; }
.print-doc .pd-kv div { display: flex; gap: 3mm; padding: 1.3mm 0; border-bottom: 1px dotted var(--pd-rule); }
.print-doc .pd-kv dt { flex: 0 0 30mm; color: var(--pd-muted); }
.print-doc .pd-kv dd { margin: 0; font-weight: 600; }
.print-doc .pd-kv em, .print-doc .pd-kpis em { font-style: normal; font-weight: 700; }
.print-doc .pd-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4mm; }
.print-doc .pd-kpis > div { border: 1px solid var(--pd-rule); border-radius: 3mm; padding: 3.5mm 4mm; background: var(--pd-soft); }
.print-doc .pd-kpis span { display: block; font-size: 8.5pt; color: var(--pd-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.print-doc .pd-kpis b { display: block; font-family: var(--font-heading); font-size: 20pt; line-height: 1.2; }
.print-doc .pd-kpis small { font-size: 10pt; color: var(--pd-muted); font-weight: 600; }
.print-doc .pd-kpis em { display: block; font-size: 9pt; color: var(--pd-accent); }
.print-doc .pd-table { width: 100%; border-collapse: collapse; font-size: 9.8pt; }
.print-doc .pd-table th { text-align: left; font-size: 8.3pt; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--pd-muted); background: var(--pd-soft); padding: 2mm 2.5mm; border-bottom: 1px solid var(--pd-rule); }
.print-doc .pd-table td { padding: 1.7mm 2.5mm; border-bottom: 1px solid var(--pd-rule); vertical-align: top; }
.print-doc .pd-table tr { break-inside: avoid; page-break-inside: avoid; }
.print-doc .pd-table em { font-style: normal; color: var(--pd-accent); font-weight: 700; }
.print-doc .pd-score td:nth-child(3), .print-doc .pd-score th:nth-child(3) { white-space: nowrap; text-align: right; }
.print-doc .pd-score td:nth-child(4) { width: 34mm; vertical-align: middle; }
.print-doc .pd-score tr:last-child td { border-bottom: 0; border-top: 1.5px solid var(--pd-ink); }
.print-doc .pd-week td:nth-child(2), .print-doc .pd-week td:nth-child(3) { white-space: nowrap; }
.print-doc .pd-week td:last-child { white-space: nowrap; width: 45mm; }
.print-doc .pd-bar { display: inline-block; vertical-align: middle; width: 100%; max-width: 30mm; height: 2.2mm; border-radius: 2mm; background: #EEEAF1; overflow: hidden; }
.print-doc .pd-week .pd-bar { width: 26mm; margin-right: 2mm; }
.print-doc .pd-bar i { display: block; height: 100%; border-radius: 2mm; }
.print-doc .pd-line { margin: 0 0 2mm; }
.print-doc .pd-muted { color: var(--pd-muted); }
.print-doc p.pd-muted { margin: 0 0 2mm; }
.print-doc .pd-tag { display: inline-block; padding: 0.3mm 2.2mm; border-radius: 3mm; font-size: 8.5pt; font-weight: 700; color: var(--c); border: 1px solid var(--c); }
.print-doc .pd-dot { display: inline-block; width: 2.4mm; height: 2.4mm; border-radius: 50%; background: var(--c); margin-right: 2mm; }
.print-doc .pd-list { margin: 0; padding-left: 5mm; }
.print-doc .pd-list li { margin: 0.8mm 0; }
.print-doc .pd-qs { margin: 0; padding-left: 6mm; }
.print-doc .pd-qs li { padding: 1mm 0 2mm; break-inside: avoid; page-break-inside: avoid; }
.print-doc .pd-qs li::marker { font-weight: 700; color: var(--pd-accent); }
.print-doc .pd-write { margin-top: 1.5mm; }
.print-doc .pd-write span { display: block; font-size: 8.3pt; color: var(--pd-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.print-doc .pd-write i { display: block; height: 6.5mm; border-bottom: 1px solid #CFC9D6; }
.print-doc .pd-write.tall { margin-top: 3mm; }
.print-doc .pd-facts td:first-child { width: 34mm; }
.print-doc .pd-fill td { height: 7.5mm; }
.print-doc .pd-fill td:first-child { width: 45mm; }
.print-doc .pd-dxa td:first-child { white-space: nowrap; width: 32mm; }
.print-doc .pd-dxa td:nth-child(2) { white-space: nowrap; }
.print-doc .pd-plan { display: grid; grid-template-columns: 1fr 1fr; gap: 1mm 8mm; }
.print-doc .pd-plan div { display: flex; align-items: flex-end; gap: 3mm; height: 8.5mm; }
.print-doc .pd-plan span { flex: 0 0 auto; font-size: 9.5pt; color: var(--pd-muted); }
.print-doc .pd-plan i { flex: 1; border-bottom: 1px solid #CFC9D6; height: 5mm; }
.print-doc .pd-note { font-size: 8.8pt; color: var(--pd-muted); border-left: 2px solid var(--pd-rule); padding-left: 3mm; margin: 2mm 0 0; }

/* ==========================================================================
   v3 additions — wizard extras, swap sheet, report
   ========================================================================== */
.no-anim .pop, .no-anim .fade-up { animation: none !important; opacity: 1 !important; }
.no-anim .wiz-progress span.on::after { animation: none; }

.unlock-banner { display: flex; align-items: center; gap: 12px; border-radius: 18px; padding: 10px 14px; margin-bottom: 16px; }
.unlock-banner b { display: block; font-family: var(--font-heading); }
.unlock-banner span { font-size: 0.84rem; }
.unlock-banner img { width: 40px; height: 40px; }
.unlock-banner.protect { background: var(--protect-bg); color: var(--protect); }
.unlock-banner.strengthen { background: var(--strengthen-bg); color: var(--strengthen); }

.choice-tile.static { cursor: default; }
.choice-tile.static:hover { transform: none; box-shadow: var(--shadow-sm); }

.room-card { background: #fff; border: 1.5px solid var(--border-subtle); border-radius: 22px; padding: 14px; box-shadow: var(--shadow-sm); }
.room-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.room-card-head img { width: 48px; height: 48px; }
.room-card-head b { display: block; font-family: var(--font-heading); font-size: 1.15rem; }
.room-card-head span { font-size: 0.78rem; color: var(--text-muted); font-weight: 700; }
.room-card .qa-row { border-color: var(--border-subtle); background: var(--bg-card-hover); }

.share-row { display: flex; gap: 10px; margin: 16px 0 12px; }
.share-row .btn { flex: 1; }
.motto-card { display: flex; align-items: center; gap: 12px; background: linear-gradient(120deg, #F7E8F1, #FDECF1); border-radius: 20px; padding: 14px 16px; }
.motto-card img { width: 48px; height: 48px; }
.motto-card b { display: block; font-family: var(--font-heading); color: var(--strengthen); }
.motto-card span { font-size: 0.84rem; color: var(--text-secondary); }

.round-btn.lg { width: 44px; height: 44px; border-radius: 14px; font-size: 0.95rem; flex-shrink: 0; }
.round-btn.on { background: var(--success); border-color: var(--success); color: #fff; }

.swap-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit; color: inherit; background: #fff; border: 1.5px solid var(--border-subtle); border-radius: 16px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; transition: border-color var(--transition-fast), background var(--transition-fast); }
.swap-row:hover { border-color: var(--build); }
.swap-row img { width: 36px; height: 36px; flex-shrink: 0; }
.swap-row-body { flex: 1; min-width: 0; }
.swap-row-body b { display: block; font-size: 0.92rem; margin-bottom: 4px; line-height: 1.3; }
.swap-pick { flex-shrink: 0; font-weight: 800; font-size: 0.8rem; color: var(--build); padding: 6px 12px; border-radius: var(--radius-full); background: var(--build-bg); }
.swap-row.selected { border-color: var(--build); background: var(--build-bg); }
.swap-row.selected .swap-pick { background: var(--grad-brand); color: #fff; }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 28px 12px; color: var(--text-muted); }
.empty-state b { color: var(--text-primary); }
.empty-state img { width: 64px; height: 64px; }

.exercise-swap-card { border-radius: 18px !important; }

.report-sheet { max-width: 640px !important; }
.report-hero { display: flex; align-items: center; gap: 18px; background: var(--grad-brand-soft); border-radius: 22px; padding: 16px; margin-bottom: 14px; }
.report-hero h3 { font-size: 1.3rem; margin: 2px 0 8px; }
.report-section { background: #fff; border: 1.5px solid var(--border-subtle); border-radius: 20px; padding: 14px 16px; margin-bottom: 12px; }
.report-section h4 { font-size: 1rem; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.report-section h4 img { width: 28px; height: 28px; }
.rb-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.rb-row:last-child { margin-bottom: 0; }
.rb-row img { width: 28px; height: 28px; flex-shrink: 0; }
.rb-main { flex: 1; }
.rb-top { display: flex; justify-content: space-between; font-size: 0.84rem; margin-bottom: 5px; }
.rb-top span { color: var(--text-muted); font-weight: 700; }
.week-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; }
.wb { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.wb-col { width: 100%; max-width: 34px; height: 90px; background: var(--bg-surface-elevated); border-radius: 10px; display: flex; align-items: flex-end; overflow: hidden; }
.wb-col i { display: block; width: 100%; background: var(--grad-brand); border-radius: 10px; transition: height 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.wb span { font-size: 0.74rem; font-weight: 800; color: var(--text-muted); }
.wb.today span { color: var(--build); }
.report-list { margin: 0; padding-left: 20px; font-size: 0.9rem; color: var(--text-secondary); line-height: 1.7; }

/* View enter animation must end on `transform: none`; any transform (even translateY(0))
   would become the containing block for the fixed wizard footer. */
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.view-section { animation: viewIn 0.3s ease; }
/* `overflow-x: hidden` on body makes it a scroll container and silently breaks
   position: sticky on the header. `clip` stops sideways scroll without that side effect. */
html { overflow-x: hidden; }
body { overflow-x: clip; }
/* Sheets and dialogs sit above the floating nav (9999) and assistant button. */
.modal-backdrop { z-index: 10050; }
.bone-chat-drawer { z-index: 10060; }
@media (max-width: 600px) {
  .bone-chat-drawer { left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); width: auto; height: calc(100dvh - 80px); border-radius: 24px; }
}
.diet-milestones-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}
.diet-milestones-container .meal-card {
  margin-bottom: 0;
  width: 100%;
}

/* Height & weight entry (Build step 1) */
.baseline-form { background: #fff; border: 1.5px solid var(--border-subtle); border-radius: 18px; padding: 12px 14px 14px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.baseline-form.shake { animation: wiggle 0.4s ease; border-color: var(--build); }
.bf-title { font-weight: 800; font-size: 0.86rem; margin-bottom: 10px; }
.bf-row { display: flex; gap: 8px; align-items: stretch; }
.bf-field { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; border: 1.5px solid var(--border-medium); border-radius: 12px; padding: 0 10px; background: var(--bg-card-hover); transition: border-color var(--transition-fast); }
.bf-field:focus-within { border-color: var(--build); background: #fff; }
.bf-field i { color: var(--build); font-size: 0.9rem; }
.bf-field input { flex: 1; min-width: 0; width: 100%; border: none; outline: none; background: transparent; padding: 10px 0; font-size: 1rem; font-weight: 700; color: var(--text-primary); -moz-appearance: textfield; }
.bf-field input::-webkit-outer-spin-button, .bf-field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bf-field span { font-size: 0.8rem; font-weight: 700; color: var(--text-muted); }
.bf-save { flex-shrink: 0; border-radius: 12px; padding: 0 14px; }
@media (max-width: 480px) {
  .bf-row { flex-wrap: wrap; }
  .bf-field { flex: 1 1 calc(50% - 4px); }
  .bf-save { flex: 1 1 100%; padding: 10px 14px; }
}

/* ==========================================================================
   GUIDED WORKOUTS — exercise home, detail sheet, full-screen player
   Sized for older adults: large type, 48px+ targets, labelled buttons.
   ========================================================================== */
.wk-hero {
  position: relative;
  overflow: hidden;
  background: #ffffff;
  border: 1.5px solid var(--border-subtle, #ECEBF2);
  border-radius: 26px;
  padding: 22px 20px 20px;
  margin-bottom: 16px;
  box-shadow: 0 10px 30px -10px rgba(42, 37, 64, 0.08);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.wk-hero::after {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  right: -70px;
  top: -90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(229, 48, 95, 0.05), transparent 70%);
  pointer-events: none;
}
.wk-hero > * {
  position: relative;
  z-index: 1;
}

/* Top bar: Trophy badge + Week streak count */
.wk-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.wk-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FFF1F5;
  color: #C2234E;
  border: 1px solid rgba(229, 48, 95, 0.16);
  border-radius: var(--radius-full);
  padding: 5px 12px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.wk-badge i {
  color: #E5305F;
  font-size: 0.75rem;
}
.wk-week-count {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #FFF9ED;
  color: #B25E00;
  border: 1px solid #FFE4B8;
  border-radius: var(--radius-full);
  padding: 4px 11px 4px 6px;
  font-weight: 800;
  font-size: 0.84rem;
}
.wk-week-count img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

/* Headings */
.wk-hero h2 {
  color: var(--text-primary, #2A2540);
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 800;
  margin: 14px 0 2px;
  line-height: 1.18;
  letter-spacing: -0.015em;
}
.wk-day {
  font-size: 0.95rem;
  color: var(--text-secondary, #605A75);
  font-weight: 600;
  margin: 0 0 12px;
}
.wk-day b {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--brand-pink, #E5305F);
}

/* Progress bar */
.wk-progress {
  height: 8px;
  border-radius: 999px;
  background: #F0EDF6;
  overflow: hidden;
  margin-bottom: 16px;
}
.wk-progress i {
  display: block;
  height: 100%;
  min-width: 8px;
  background: var(--grad-brand, linear-gradient(135deg, #E5305F, #8F2D56));
  border-radius: 999px;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Day of week strip: Clean, airy mini capsules */
.wk-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin: 0 0 16px;
}
.wk-week span {
  aspect-ratio: 1;
  max-width: 40px;
  justify-self: center;
  width: 100%;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.8rem;
  background: #F7F6FA;
  color: #726C88;
  border: 1px solid #EBE7F3;
  transition: all 0.2s ease;
}
.wk-week span.today {
  background: var(--brand-navy, #2A2540);
  color: #ffffff;
  border-color: var(--brand-navy, #2A2540);
  box-shadow: 0 4px 12px rgba(42, 37, 64, 0.24);
  transform: translateY(-2px);
}
.wk-week span.done {
  background: #E8F8F0;
  color: #168A53;
  border-color: #BBEBD3;
}

/* Today's workout preview row */
.wk-today {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #FAF9FD;
  border: 1.5px solid #EBE7F3;
  border-radius: 20px;
  padding: 12px 14px;
  margin-bottom: 16px;
}
.wk-today-icons {
  display: flex;
  align-items: center;
}
.wk-today-icons span {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #EBE7F3;
  box-shadow: 0 2px 8px rgba(42, 37, 64, 0.08);
  display: grid;
  place-items: center;
  margin-left: -10px;
  position: relative;
  transition: transform var(--transition-fast);
}
.wk-today-icons span:first-child {
  margin-left: 0;
}
.wk-today-icons span:hover {
  transform: translateY(-2px) scale(1.08);
  z-index: 2;
}
.wk-today-icons span img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.wk-today-icons span.done::after {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--success, #168A53);
  color: #fff;
  font-size: 0.55rem;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
}
.wk-today-text {
  flex: 1;
  min-width: 0;
}
.wk-today-text b {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--text-primary, #2A2540);
  line-height: 1.3;
}
.wk-today-text span {
  font-size: 0.84rem;
  color: var(--text-secondary, #605A75);
  font-weight: 600;
}

/* Call to action button */
.wk-hero-btn {
  width: 100%;
  min-height: 52px;
  border: none;
  border-radius: var(--radius-full);
  background: var(--grad-brand, linear-gradient(135deg, #E5305F, #8F2D56));
  color: #ffffff;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 8px 22px -6px rgba(229, 48, 95, 0.45);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast);
}
.wk-hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -6px rgba(229, 48, 95, 0.55);
  filter: brightness(1.03);
}
.wk-hero-btn:active {
  transform: scale(0.98);
}
.wk-hero-btn i {
  font-size: 0.95rem;
}

.wk-safety { display: flex; align-items: center; gap: 12px; background: #FFF8E6; border: 1.5px solid #FBE3A8; border-radius: 18px; padding: 10px 14px; margin-bottom: 14px; }
.wk-safety img { width: 40px; height: 40px; flex-shrink: 0; }
.wk-safety p { margin: 0; font-size: 0.92rem; color: #6B4E0F; line-height: 1.4; }

.wk-section-title { font-size: 1.2rem; margin: 18px 0 10px; }
/* One row: a card per focus group (3 today). */
.wk-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; margin-bottom: 18px; }
.wk-group { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px 12px; background: #fff; border: 2px solid var(--border-subtle); border-radius: 22px; cursor: pointer; font: inherit; color: inherit; transition: all var(--transition-normal); box-shadow: var(--shadow-sm); }
.wk-group img { width: 52px; height: 52px; transition: transform var(--transition-bounce); }
.wk-group b { font-family: var(--font-heading); font-size: 1.05rem; }
.wk-group small { font-size: 0.8rem; color: var(--text-muted); font-weight: 700; }
.wk-group:hover img { transform: scale(1.08); }
.wk-group.active { border-color: var(--build); background: var(--build-bg); box-shadow: 0 8px 20px -12px var(--build); }
.wk-group.active b { color: var(--build); }

.wk-list-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; scroll-margin-top: 80px; }
.wk-list-head h3 { font-size: 1.35rem; margin: 0; }
.wk-list-head span { font-size: 0.86rem; color: var(--text-muted); font-weight: 600; }
.wk-start-all { flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 18px; border: none; border-radius: var(--radius-full); background: var(--grad-brand); color: #fff; font-family: var(--font-heading); font-weight: 700; font-size: 0.98rem; cursor: pointer; box-shadow: var(--shadow-brand); }
.wk-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.wk-row { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; font: inherit; color: inherit; background: #fff; border: 1.5px solid var(--border-subtle); border-radius: 20px; padding: 10px 14px 10px 10px; cursor: pointer; transition: border-color var(--transition-fast), transform var(--transition-fast); }
.wk-row:hover { border-color: var(--build); }
.wk-row:active { transform: scale(0.99); }
.wk-row.done { background: linear-gradient(120deg, #F1FBF6, #fff 60%); border-color: #BFE7D2; }
.wk-thumb { position: relative; flex-shrink: 0; width: 72px; height: 96px; border-radius: 16px; overflow: hidden; background: #EEEEEE; display: grid; place-items: center; }
.wk-thumb img { width: 100%; height: 100%; aspect-ratio: 3 / 4; object-fit: contain; object-position: center; display: block; background: #EEEEEE; }
/* Absolute so the portrait clip can't size the grid cell (percent heights don't resolve there). */
.wk-thumb video { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: 3 / 4; object-fit: contain; object-position: center; display: block; background: #EEEEEE; border: none !important; outline: none !important; }
.wk-thumb.illus { background: var(--grad-brand-soft); }
.wk-thumb.illus img { width: 48px; height: 48px; object-fit: contain; }
.wk-play { position: absolute; right: 5px; bottom: 5px; width: 24px; height: 24px; border-radius: 50%; background: rgba(255, 255, 255, 0.95); color: var(--build); font-size: 0.6rem; display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.wk-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wk-row-body b { font-family: var(--font-heading); font-size: 1.08rem; line-height: 1.25; }
.wk-row-body span { font-size: 0.9rem; color: var(--text-secondary); font-weight: 600; }
.wk-level { align-self: flex-start; font-size: 0.74rem; font-weight: 800; padding: 2px 9px; border-radius: var(--radius-full); margin-top: 2px; }
.wk-level.easy { background: #E7F6EE; color: #157A4A; }
.wk-level.mod { background: #FFF1DD; color: #9A5B06; }
.wk-row-go { color: var(--text-muted); }
.wk-row-done { width: 32px; height: 32px; border-radius: 50%; background: var(--success); color: #fff; display: grid; place-items: center; flex-shrink: 0; font-size: 0.85rem; }
.wk-row-check { width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--border-subtle); background: var(--bg-card-hover); color: var(--text-muted); display: grid; place-items: center; cursor: pointer; font-size: 1.15rem; transition: all var(--transition-fast); flex-shrink: 0; }
.wk-row-check:hover { border-color: var(--build); color: var(--build); transform: scale(1.08); }
.wk-row-check.done { background: var(--success); border-color: var(--success); color: #fff; }

/* ---------- Detail sheet ---------- */
.exd-backdrop { padding: 0; align-items: flex-end; }
@media (min-width: 640px) { .exd-backdrop { align-items: center; padding: 20px; } }
.exd-card { max-width: 560px; width: 100%; padding: 0; max-height: 94vh; border-radius: 28px 28px 0 0; display: flex; flex-direction: column; overflow: hidden; animation: sheetUp 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
@media (min-width: 640px) { .exd-card { border-radius: 28px; } }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
#exDetailBody { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.exd-media { position: relative; height: min(48vh, 400px); background: #EEEEEE; display: grid; place-items: center; overflow: hidden; }
.exd-media video { width: 100%; height: 100%; aspect-ratio: 3 / 4; object-fit: contain; object-position: center; background: #EEEEEE; border: none !important; outline: none !important; }
.exd-illus { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--text-secondary); font-weight: 700; font-size: 0.92rem; }
.exd-media:has(.exd-illus) { background: var(--grad-brand-soft); }
.exd-close { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%; border: none; background: rgba(255, 255, 255, 0.95); color: var(--text-primary); font-size: 1.1rem; cursor: pointer; box-shadow: var(--shadow-md); }
.exd-body { padding: 18px 18px 12px; }
.exd-title { font-size: 1.6rem; font-weight: 800; margin: 8px 0 12px; line-height: 1.15; }
.exd-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); padding: 12px 0; margin-bottom: 14px; }
.exd-stats.two-col { grid-template-columns: repeat(2, 1fr) !important; }
.exd-stats div { padding: 0 10px; border-left: 1px solid var(--border-subtle); }
.exd-stats div:first-child { border-left: none; padding-left: 0; }
.exd-stats b { display: block; font-family: var(--font-heading); font-size: 1.02rem; line-height: 1.2; }
.exd-stats span { font-size: 0.8rem; color: var(--text-muted); font-weight: 700; }
.exd-duration { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.exd-duration > span { font-weight: 800; font-size: 0.86rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--build); }
.exd-stepper { display: flex; align-items: center; gap: 12px; }
.exd-stepper b { font-family: var(--font-heading); font-size: 1.3rem; min-width: 64px; text-align: center; font-variant-numeric: tabular-nums; }
.exd-stepper button { width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid var(--border-medium); background: #fff; color: var(--text-primary); cursor: pointer; font-size: 0.95rem; }
.exd-h { font-size: 0.86rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--build); margin: 20px 0 10px; font-family: var(--font-body); }
.exd-steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: flex; flex-direction: column; gap: 10px; }
.exd-steps li { counter-increment: step; display: flex; gap: 12px; font-size: 1.02rem; line-height: 1.5; color: var(--text-primary); }
.exd-steps li::before { content: counter(step); flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--build-bg); color: var(--build); font-weight: 800; display: grid; place-items: center; font-size: 0.9rem; }
.exd-safety { display: flex; gap: 10px; align-items: flex-start; background: #FFF8E6; border: 1.5px solid #FBE3A8; color: #6B4E0F; border-radius: 16px; padding: 12px 14px; margin-top: 14px; font-size: 0.95rem; line-height: 1.45; }
.exd-safety i { margin-top: 3px; color: #C27C0E; }
.exd-focus { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.exd-focus span { display: inline-flex; align-items: center; gap: 8px; background: var(--bg-surface-elevated); border-radius: var(--radius-full); padding: 7px 14px; font-weight: 700; font-size: 0.92rem; }
.exd-focus span i { width: 10px; height: 10px; border-radius: 50%; background: #F49BB3; }
.exd-focus span.primary i { background: #D6265A; }
.body-map { display: block; width: 100%; max-width: 300px; margin: 6px auto 0; }
.exd-bones { display: flex; flex-wrap: wrap; gap: 8px; }
.exd-bones span { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1.5px solid var(--border-subtle); border-radius: var(--radius-full); padding: 5px 14px 5px 8px; font-weight: 700; font-size: 0.92rem; }
.exd-bones img { width: 22px; height: 22px; }
.exd-benefits { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.exd-benefits li { display: flex; gap: 10px; align-items: flex-start; font-size: 1rem; line-height: 1.45; }
.exd-benefits i { color: var(--success); margin-top: 4px; }
.exd-footer { display: flex; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--border-subtle); background: #fff; }
.exd-footer .btn { flex: 0 0 auto; min-height: 52px; }
.exd-footer .cta-btn { flex: 1; min-height: 52px; font-size: 1.1rem; }

/* ---------- Full-screen player ---------- */
.player { position: fixed; inset: 0; z-index: 10080; background: #EEEEEE; display: flex; flex-direction: column; overflow: hidden; }
.player[hidden] { display: none !important; }
body.player-open { overflow: hidden; }
body.player-open .pillar-bottom-nav, body.player-open .bone-ai-fab { display: none; }
.pl-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
  position: relative;
  z-index: 10;
  background: #EEEEEE;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}
.pl-icon { width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%; border: none; background: #FFFFFF; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); color: var(--text-primary); font-size: 1.05rem; cursor: pointer; display: grid; place-items: center; transition: all var(--transition-fast); }
.pl-icon:hover { background: #FFFFFF; transform: scale(1.05); }
.pl-segs { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; }
.pl-segs span { width: 10px; height: 10px; border-radius: 50%; background: rgba(0, 0, 0, 0.16); flex: 0 0 auto; transition: all var(--transition-fast); }
.pl-segs span.now { width: 24px; border-radius: var(--radius-full); background: var(--grad-brand); }
.pl-segs span.done { background: var(--success); width: 10px; border-radius: 50%; }
.pl-segs span.skipped { background: rgba(0, 0, 0, 0.28); width: 10px; border-radius: 50%; }

/* Slim vertical volume bar popup attached to speaker button */
.pl-vol-wrap { position: relative; display: inline-flex; align-items: center; }
.pl-vol-pop {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid var(--border-subtle);
  border-radius: 22px;
  padding: 14px 10px 10px 10px;
  box-shadow: 0 10px 30px -4px rgba(42, 37, 64, 0.20), 0 4px 12px rgba(42, 37, 64, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: popIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pl-vol-pop[hidden] { display: none !important; }
.pl-vol-track-wrap { height: 110px; width: 26px; display: flex; align-items: center; justify-content: center; position: relative; }
.pl-vol-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 96px;
  height: 4px;
  background: var(--border-medium);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
  transform: rotate(-90deg);
  transform-origin: center center;
  margin: 0;
}
.pl-vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--build);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(214, 38, 90, 0.4);
  border: 2px solid #FFFFFF;
  transition: transform 0.15s ease;
}
.pl-vol-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }
.pl-vol-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--build);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(214, 38, 90, 0.4);
  border: 2px solid #FFFFFF;
}
.pl-vol-val {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.player[data-phase="rest"] .pl-icon { background: rgba(255, 255, 255, 0.22); color: #fff; }
.player[data-phase="rest"] .pl-segs span { background: rgba(255, 255, 255, 0.35); }
.player[data-phase="rest"] .pl-segs span.now { background: #FFFFFF; }
.player[data-phase="rest"] .pl-segs span.done { background: #FFFFFF; }
.player[data-phase="rest"] .pl-vol-pop { background: rgba(51, 45, 75, 0.95); border-color: rgba(255, 255, 255, 0.18); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); }
.player[data-phase="rest"] .pl-vol-slider { background: rgba(255, 255, 255, 0.3); }
.player[data-phase="rest"] .pl-vol-slider::-webkit-slider-thumb { background: #FFFFFF; border-color: var(--build); }
.player[data-phase="rest"] .pl-vol-val { color: rgba(255, 255, 255, 0.85); }

.pl-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #EEEEEE;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  overflow: hidden;
  width: 100%;
}
.pl-media {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #EEEEEE;
}
.pl-media video {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  object-position: center;
  display: block;
  background: #EEEEEE;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}
.pl-illus { width: 100%; height: 100%; overflow-y: auto; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 18px 22px; background: var(--grad-brand-soft); border-radius: 18px; }
.pl-illus ol { margin: 0; padding-left: 22px; max-width: 460px; font-size: 1.08rem; line-height: 1.55; color: var(--text-primary); }
.pl-illus li { margin-bottom: 6px; }
.pl-ready { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: rgba(42, 37, 64, 0.62); color: #fff; text-align: center; padding: 20px; }
.pl-ready[hidden] { display: none; }
.pl-ready-label { font-family: var(--font-heading); font-weight: 800; font-size: 1.35rem; letter-spacing: 0.08em; text-transform: uppercase; }
.pl-ready b { font-family: var(--font-heading); font-size: clamp(3rem, 16vw, 4.5rem); line-height: 1; font-weight: 900; }
.pl-ready-name { font-size: 1.05rem; font-weight: 700; opacity: 0.95; margin-bottom: 12px; }
.pl-ready-btn { min-height: 46px; padding: 0 28px; border: none; border-radius: var(--radius-full); background: #fff; color: var(--build); font-family: var(--font-heading); font-weight: 800; font-size: 1rem; cursor: pointer; }
.pl-info { padding: 12px 18px calc(14px + env(safe-area-inset-bottom, 0px)); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 1px; background: #fff; border-radius: 28px 28px 0 0; box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.06); position: relative; z-index: 5; flex-shrink: 0; }
.pl-count { font-size: 0.78rem; font-weight: 800; color: var(--text-muted); letter-spacing: 0.04em; }
.pl-name { font-size: 1.2rem; font-weight: 800; margin: 1px 0 0; line-height: 1.2; }
.pl-reps { font-size: 0.85rem; color: var(--text-secondary); font-weight: 600; }
.pl-timer { font-family: var(--font-heading); font-weight: 800; font-size: 1.65rem; line-height: 1.1; font-variant-numeric: tabular-nums; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; margin: 2px 0 3px 0; }
.pl-timer.is-reps { display: inline-flex; align-items: baseline; justify-content: center; gap: 6px; font-size: 2.2rem; cursor: pointer; user-select: none; transition: transform 0.12s ease; }
.pl-timer.is-reps:active { transform: scale(0.92); }
.pl-timer.is-reps small { font-size: 0.95rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.85; }
.player.paused .pl-timer { opacity: 0.45; }
.pl-bar { width: min(400px, 100%); height: 5px; border-radius: 6px; background: var(--bg-surface-elevated); overflow: hidden; margin: 2px 0 8px; }
.pl-bar i { display: block; height: 100%; width: 0; background: var(--grad-brand); border-radius: 6px; transition: width 0.95s linear; }
.pl-bar.light { background: rgba(255, 255, 255, 0.25); }
.pl-bar.light i { background: #fff; }
.pl-controls { display: flex; gap: 8px; width: min(400px, 100%); }
.pl-main { flex: 1; min-height: 44px; height: 44px; font-size: 0.95rem; border-radius: 14px; padding: 0 14px; }
.pl-done-btn { min-height: 44px; height: 44px; padding: 0 14px; border-radius: 14px; border: 1.5px solid #A7F3D0; background: #ECFDF5; color: #065F46; font-family: var(--font-heading); font-weight: 800; font-size: 0.92rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: all var(--transition-fast); }
.pl-done-btn:hover { background: #D1FAE5; transform: translateY(-1px); }
.pl-skip { min-height: 44px; height: 44px; padding: 0 12px; border-radius: 14px; border: 1.5px solid var(--border-medium); background: #fff; color: var(--text-muted); font-family: var(--font-heading); font-weight: 700; font-size: 0.88rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.pl-safety { margin: 6px 0 0; font-size: 0.78rem; color: #6B4E0F; display: flex; gap: 5px; align-items: flex-start; max-width: 400px; text-align: left; line-height: 1.35; }
.pl-safety i { color: #C27C0E; margin-top: 2px; }
.pl-next { margin: 3px 0 0; font-size: 0.8rem; font-weight: 700; color: var(--text-muted); }
.player[data-phase="ready"] .pl-timer, .player[data-phase="ready"] .pl-bar, .player[data-phase="ready"] .pl-controls { display: none; }
.player[data-phase="rest"] .pl-info,
.player[data-phase="done"] .pl-info {
  display: none !important;
}

.pl-rest { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--grad-brand); color: #fff; z-index: 20; }
.pl-rest[hidden] { display: none !important; }
.pl-rest-top { padding: calc(64px + env(safe-area-inset-top, 0px)) 20px 14px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.pl-rest-label { font-family: var(--font-heading); font-weight: 800; font-size: 1.2rem; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.95; }
.pl-rest-timer { font-family: var(--font-heading); font-weight: 800; font-size: clamp(2.2rem, 9vw, 2.8rem); line-height: 1; font-variant-numeric: tabular-nums; margin: 3px 0 6px; }
.pl-rest-actions { display: flex; gap: 10px; margin: 4px 0 10px; }
.pl-rest-actions button { min-height: 44px; padding: 0 18px; border-radius: var(--radius-full); border: none; background: rgba(255, 255, 255, 0.2); color: #fff; font-family: var(--font-heading); font-weight: 800; font-size: 0.95rem; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.pl-rest-actions button.solid { background: #fff; color: var(--build); }
.pl-rest-tip { margin: 0; font-size: 0.86rem; opacity: 0.9; }
.pl-rest-next { flex: 1; min-height: 0; background: #fff; color: var(--text-primary); border-radius: 24px 24px 0 0; padding: 16px 20px calc(14px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; }
.pl-rest-next-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; }
.pl-rest-next-head span { display: block; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--build); }
.pl-rest-next-head b { font-family: var(--font-heading); font-size: 1.15rem; }
.pl-rest-time { font-family: var(--font-heading); font-weight: 800; font-size: 1rem; color: var(--text-muted); }
.pl-rest-preview { flex: 1; min-height: 0; display: grid; place-items: center; margin-top: 8px; background: #EEEEEE; border-radius: 18px 18px 0 0; overflow: hidden; position: relative; }
.pl-rest-preview img { max-width: 100%; max-height: 100%; aspect-ratio: 3 / 4; object-fit: contain; object-position: center; }
.pl-rest-preview .i3d { width: 100px; height: 100px; }

.pl-done { position: absolute; inset: 0; z-index: 30; background: radial-gradient(700px 400px at 50% 0%, #FDECF1, #fff 70%); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px 22px calc(24px + env(safe-area-inset-bottom, 0px)); gap: 8px; overflow-y: auto; }
.pl-done[hidden] { display: none !important; }
.pl-done h2 { font-size: 1.8rem; margin: 4px 0 0; }
.pl-done p { margin: 0; color: var(--text-secondary); font-size: 0.96rem; }
.pl-done-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: min(400px, 100%); margin: 10px 0; }
.pl-done-stats div { background: #fff; border: 1.5px solid var(--border-subtle); border-radius: 16px; padding: 10px 4px; }
.pl-done-stats b { display: block; font-family: var(--font-heading); font-size: 1.6rem; color: var(--build); line-height: 1.1; }
.pl-done-stats span { font-size: 0.78rem; font-weight: 700; color: var(--text-muted); }
.pl-done-list { list-style: none; padding: 0; margin: 0 0 12px; width: min(400px, 100%); display: flex; flex-direction: column; gap: 6px; text-align: left; }
.pl-done-list li { display: flex; gap: 8px; align-items: center; font-weight: 700; font-size: 0.92rem; color: var(--text-muted); background: #fff; border-radius: 12px; padding: 8px 12px; border: 1px solid var(--border-subtle); }
.pl-done-list li.ok { color: var(--text-primary); }
.pl-done-list li.ok i { color: var(--success); }
@media (min-width: 900px) {
  .player {
    display: flex;
    flex-direction: column;
    max-width: 480px;
    height: min(94vh, 900px);
    inset: auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 32px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.2);
  }
}

/* Media boxes: pin video/images inside a clipped box so tall portrait clips can't overflow. */
.exd-media, .pl-rest-preview { overflow: hidden; }
.exd-media > video { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: 3 / 4; object-fit: contain; object-position: center; background: #EEEEEE; }
.pl-rest-preview { position: relative; }
.pl-rest-preview > img:not(.i3d) { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; aspect-ratio: 3 / 4; object-fit: contain; object-position: center; background: #EEEEEE; }


/* ==========================================================================
   Languages (js/i18n.js): picker, top-bar pill, Indian-script typography
   ========================================================================== */
html.i18n-pending body { visibility: hidden; }

/* Outfit has no Indian scripts: the browser falls back per glyph to the Noto
   font loaded for the chosen language (then to the system's Indic fonts). */
:root {
  --font-indic: 'Noto Sans Devanagari', 'Noto Sans Bengali', 'Noto Sans Telugu', 'Noto Sans Tamil', 'Noto Sans Gujarati', 'Noto Sans Kannada', 'Noto Sans Malayalam', 'Noto Sans Gurmukhi', 'Noto Sans Oriya', 'Nirmala UI';
  --font-heading: 'Outfit', var(--font-indic), system-ui, -apple-system, sans-serif;
  --font-body: 'Outfit', var(--font-indic), system-ui, -apple-system, sans-serif;
}
/* Letter-spacing and all-caps break Indian scripts' joined letters; give them a little more line height. */
html:not([lang="en"]) body, html:not([lang="en"]) body * { letter-spacing: normal !important; }
html:not([lang="en"]) body { line-height: 1.55; }
html:not([lang="en"]) h1, html:not([lang="en"]) h2, html:not([lang="en"]) h3, html:not([lang="en"]) h4 { line-height: 1.35; }
html:not([lang="en"]) button, html:not([lang="en"]) .cta-btn { line-height: 1.35; }

.lang-pill { gap: 6px; }
.lang-pill .fa-language { font-size: 1rem; color: var(--strengthen); }
.lang-pill span { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
@media (max-width: 340px) { .lang-pill span { display: none; } }

.lang-overlay { position: fixed; inset: 0; z-index: 100100; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(42, 37, 64, 0.45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity 0.2s ease; }
.lang-overlay.open { opacity: 1; }
.lang-overlay.first-run { background: linear-gradient(160deg, #FFF7FA 0%, #F7F1F8 55%, #EFEAF6 100%); backdrop-filter: none; }
.lang-card { position: relative; width: 100%; max-width: 560px; max-height: calc(100dvh - 32px); display: flex; flex-direction: column; background: #fff; border-radius: 28px; box-shadow: 0 24px 60px rgba(42, 37, 64, 0.22); transform: translateY(14px) scale(0.98); transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1); overflow: hidden; }
.lang-overlay.open .lang-card { transform: none; }
.lang-overlay.first-run .lang-card { box-shadow: 0 18px 50px rgba(142, 44, 106, 0.16); }
.lang-close { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--bg-surface-elevated, #F6F4F8); color: var(--text-secondary); cursor: pointer; font-size: 1rem; z-index: 1; }
.lang-overlay.first-run .lang-close { display: none; }
.lang-head { text-align: center; padding: 28px 24px 14px; }
.lang-head-icon { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: var(--grad-brand); color: #fff; font-size: 1.6rem; box-shadow: 0 8px 20px rgba(214, 38, 90, 0.25); margin-bottom: 12px; }
.lang-head h2 { margin: 0; font-family: var(--font-heading); font-size: 1.45rem; font-weight: 800; color: var(--text-primary); line-height: 1.3; }
.lang-head p { margin: 6px 0 0; color: var(--text-muted); font-size: 0.92rem; line-height: 1.45; }
.lang-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 6px 20px 14px; overflow-y: auto; overscroll-behavior: contain; }
.lang-option { position: relative; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 12px; text-align: left; background: #fff; border: 1.5px solid var(--border-subtle); border-radius: 18px; cursor: pointer; font: inherit; color: var(--text-primary); transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease; }
.lang-option:hover { border-color: var(--border-medium); transform: translateY(-1px); }
.lang-option:focus-visible { outline: 3px solid rgba(142, 44, 106, 0.35); outline-offset: 2px; }
.lang-glyph { flex: 0 0 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: var(--strengthen-bg, #F7E8F1); color: var(--strengthen); font-size: 1.35rem; font-weight: 700; line-height: 1; }
.lang-names { display: flex; flex-direction: column; min-width: 0; }
.lang-names b { font-size: 1.08rem; font-weight: 700; line-height: 1.3; }
.lang-names small { font-size: 0.78rem; color: var(--text-muted); font-weight: 600; }
.lang-tick { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--strengthen); color: #fff; font-size: 0.7rem; opacity: 0; transform: scale(0.6); transition: opacity 0.15s ease, transform 0.15s ease; }
.lang-option.selected { border-color: var(--strengthen); background: #FDF7FB; box-shadow: 0 6px 16px rgba(142, 44, 106, 0.14); }
.lang-option.selected .lang-glyph { background: var(--grad-brand); color: #fff; }
.lang-option.selected .lang-tick { opacity: 1; transform: none; }
.lang-footer { padding: 12px 20px calc(18px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--border-subtle); background: #fff; }
.lang-continue { width: 100%; justify-content: center; }
.lang-continue:disabled { opacity: 0.7; }
@media (min-width: 640px) { .lang-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) {
  .lang-overlay { padding: 0; align-items: flex-end; }
  .lang-overlay.first-run { align-items: stretch; }
  .lang-card { max-height: 92dvh; border-radius: 26px 26px 0 0; }
  .lang-overlay.first-run .lang-card { max-height: none; height: 100dvh; border-radius: 0; box-shadow: none; }
  .lang-head { padding: 24px 20px 10px; }
  .lang-grid { padding: 6px 16px 12px; gap: 8px; }
  .lang-option { min-height: 60px; padding: 8px 10px; gap: 10px; }
}
body.lang-open { overflow: hidden; }

.lang-overlay[hidden] { display: none; }

/* ==========================================================================
   Player top bar + volume: floating controls, thin progress line, and a
   slim vertical volume line on the right that only appears on speaker tap.
   ========================================================================== */
.player[data-phase="rest"] .pl-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
  border-bottom: none;
  z-index: 30;
}
.pl-icon { width: 42px; height: 42px; font-size: 1rem; background: #FFFFFF; box-shadow: 0 2px 10px rgba(42, 37, 64, 0.10); }
.pl-icon:hover { background: #fff; }

.pl-vol-pop {
  top: calc(100% + 10px); right: 50%; transform: translateX(50%);
  background: none; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none;
  padding: 0; gap: 6px; animation: plVolIn 0.18s ease-out;
}
@keyframes plVolIn { from { opacity: 0; transform: translate(50%, -6px); } to { opacity: 1; transform: translateX(50%); } }
.pl-vol-track-wrap { height: 132px; width: 24px; }
.pl-vol-slider {
  width: 124px; height: 3px;
  background: linear-gradient(to right, var(--build) var(--vol, 100%), rgba(42, 37, 64, 0.22) var(--vol, 100%));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.55);
}
.pl-vol-slider::-webkit-slider-thumb { width: 14px; height: 14px; border: 2px solid #fff; box-shadow: 0 1px 6px rgba(42, 37, 64, 0.35); }
.pl-vol-slider::-moz-range-thumb { width: 14px; height: 14px; border: 2px solid #fff; box-shadow: 0 1px 6px rgba(42, 37, 64, 0.35); }
.pl-vol-slider::-moz-range-track { background: transparent; }
.pl-vol-val { font-size: 0.68rem; color: var(--text-primary); text-shadow: 0 0 4px #fff, 0 0 2px #fff; }

.player[data-phase="rest"] .pl-icon { background: rgba(255, 255, 255, 0.2); box-shadow: none; }
.player[data-phase="rest"] .pl-vol-pop { background: none; border: 0; box-shadow: none; }
.player[data-phase="rest"] .pl-vol-slider { background: linear-gradient(to right, #fff var(--vol, 100%), rgba(255, 255, 255, 0.3) var(--vol, 100%)); box-shadow: none; }
.player[data-phase="rest"] .pl-vol-val { color: #fff; text-shadow: none; }

/* Longer labels in Indian languages wrap inside buttons: keep icons whole and text centred. */
button > i, .cta-btn > i, .btn > i { flex-shrink: 0; }
.wk-hero-btn { padding: 10px 24px; text-align: center; line-height: 1.3; }

/* ==========================================================================
   STRENGTHEN CLINICAL MEDICAL PORTAL (V3.5)
   ========================================================================== */
.strengthen-subtabs-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 4px 14px;
  margin-bottom: 12px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.strengthen-subtabs-scroll::-webkit-scrollbar { display: none; }

.st-subtab-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1.5px solid var(--border-medium);
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.92rem;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}
.st-subtab-pill:hover {
  border-color: var(--strengthen);
  color: var(--text-primary);
  transform: translateY(-1px);
}
.st-subtab-pill.active {
  background: var(--strengthen);
  color: #ffffff;
  border-color: var(--strengthen);
  box-shadow: 0 4px 14px rgba(142, 44, 106, 0.35);
}
.st-subtab-pill img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  transition: transform 0.2s ease;
}
.st-subtab-pill.active img {
  transform: scale(1.15);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25));
}

/* Strengthen Section Cards */
.st-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.st-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.st-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.st-title-wrap h3 {
  margin: 0;
  font-size: 1.22rem;
  font-weight: 800;
  color: var(--text-primary);
}
.st-subtitle {
  margin: 4px 0 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* DXA Interactive Section */
.dxa-inputs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.dxa-site-box {
  background: var(--bg-surface-elevated);
  border: 1.5px solid var(--border-subtle);
  border-radius: 16px;
  padding: 12px;
  text-align: center;
  transition: border-color 0.2s;
}
.dxa-site-box:focus-within {
  border-color: var(--strengthen);
  box-shadow: 0 0 0 3px rgba(142, 44, 106, 0.15);
}
.dxa-site-box b {
  display: block;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.dxa-input-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.dxa-num-input {
  width: 72px;
  text-align: center;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
  border-radius: 10px;
  padding: 4px 6px;
  background: #fff;
}

.dxa-gauge-panel {
  background: linear-gradient(145deg, #FBF9FC 0%, #F5F0F7 100%);
  border: 1.5px solid rgba(142, 44, 106, 0.15);
  border-radius: 20px;
  padding: 18px;
  margin-bottom: 16px;
}
.dxa-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.dxa-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 0.88rem;
  color: #fff;
}
.dxa-status-badge.normal { background: #1E9E62; }
.dxa-status-badge.osteopenia { background: #D97706; }
.dxa-status-badge.osteoporosis { background: #B1315D; }

.dxa-scale-bar {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  height: 28px;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  margin: 12px 0 8px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.12);
}
.dxa-scale-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.dxa-scale-seg.danger { background: #B1315D; }
.dxa-scale-seg.warn { background: #D97706; }
.dxa-scale-seg.ok { background: #1E9E62; }

.dxa-needle-tracker {
  position: relative;
  height: 18px;
  margin-bottom: 10px;
}
.dxa-needle-pin {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.dxa-needle-pin i {
  color: #332D4B;
  font-size: 1rem;
}
.dxa-needle-pin span {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 800;
  color: #332D4B;
  white-space: nowrap;
}

.dxa-advice-box {
  background: #fff;
  border-left: 4px solid var(--strengthen);
  border-radius: 12px;
  padding: 12px 16px;
  margin-top: 12px;
}
.dxa-advice-box b {
  display: block;
  font-size: 0.94rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.dxa-advice-box p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* FRAX Estimator */
.frax-factors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin: 14px 0 18px;
}
.frax-factor-btn {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--bg-surface-elevated);
  border: 1.5px solid var(--border-subtle);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
}
.frax-factor-btn.active {
  background: #FAF0F5;
  border-color: var(--strengthen);
  box-shadow: 0 2px 8px rgba(142, 44, 106, 0.18);
}
.frax-factor-btn .tick-box {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--border-medium);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 2px;
  background: #fff;
}
.frax-factor-btn.active .tick-box {
  background: var(--strengthen);
  border-color: var(--strengthen);
  color: #fff;
}
.frax-factor-info b {
  display: block;
  font-size: 0.92rem;
  color: var(--text-primary);
}
.frax-factor-info span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.frax-output-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  background: linear-gradient(135deg, #FAF4F8 0%, #F3EAF1 100%);
  border: 1.5px solid rgba(142, 44, 106, 0.2);
  border-radius: 20px;
  padding: 16px;
  text-align: center;
}
.frax-kpi b {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--strengthen);
  line-height: 1.1;
}
.frax-kpi span {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
}

/* Biomarker Trackers */
.biomarkers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.biomarker-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bm-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.bm-head b {
  font-size: 0.94rem;
  color: var(--text-primary);
}
.bm-val-badge {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text-primary);
  background: #fff;
  border: 1px solid var(--border-medium);
  border-radius: 8px;
  padding: 2px 8px;
}
.bm-slider {
  width: 100%;
  accent-color: var(--strengthen);
  cursor: pointer;
}
.bm-tip {
  font-size: 0.82rem;
  color: var(--text-secondary);
  background: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  border-left: 3px solid var(--strengthen);
  line-height: 1.35;
}

/* Supplement & Timing Guide */
.timing-calc-box {
  background: linear-gradient(135deg, #F8F6FC 0%, #F1EEF9 100%);
  border: 1.5px solid rgba(74, 63, 122, 0.2);
  border-radius: 20px;
  padding: 18px;
  margin-bottom: 16px;
}
.timing-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 14px;
  flex-wrap: wrap;
}
.timing-time-input {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  padding: 6px 12px;
  border: 1.5px solid var(--border-medium);
  border-radius: 12px;
  background: #fff;
}
.timing-result-badge {
  background: #1E9E62;
  color: #fff;
  padding: 10px 16px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.calcium-compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.calcium-compare-card {
  background: #fff;
  border: 1.5px solid var(--border-subtle);
  border-radius: 18px;
  padding: 16px;
}
.calcium-compare-card.ccm { border-color: rgba(30, 158, 98, 0.4); }
.calcium-compare-card.carbonate { border-color: rgba(217, 119, 6, 0.4); }
.calcium-compare-card h4 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}
.calcium-compare-card p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Movement Flashcards & Emergency */
.movements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
}
.movement-card {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
}
.mc-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1rem;
  color: var(--text-primary);
}
.mc-danger {
  background: #FDF2F2;
  border-left: 3px solid #DC2626;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.82rem;
  color: #991B1B;
  line-height: 1.35;
}
.mc-safe {
  background: #F0FDF4;
  border-left: 3px solid #1E9E62;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.82rem;
  color: #166534;
  line-height: 1.35;
}

.emergency-steps-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}
.emergency-step-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: #FAF9FC;
  border-radius: 16px;
  padding: 12px 16px;
  border: 1px solid var(--border-subtle);
}
.es-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--strengthen);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.95rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.es-text b {
  display: block;
  font-size: 0.94rem;
  color: var(--text-primary);
}
.es-text span {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Doctor Brief & AI Prompt Card */
.doctor-brief-box {
  background: #fff;
  border: 1.5px solid rgba(142, 44, 106, 0.25);
  border-radius: 20px;
  padding: 20px;
}
.db-patient-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  background: var(--bg-surface-elevated);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 16px;
}
.db-stat span { display: block; font-size: 0.75rem; color: var(--text-muted); font-weight: 700; }
.db-stat b { font-size: 0.98rem; color: var(--text-primary); }

.db-prompts-list {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.db-prompt-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #FAF8FB;
  border-radius: 12px;
  padding: 10px 14px;
  border-left: 3px solid var(--strengthen);
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.doctor-actions-footer {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.strengthen-ai-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, #FFFFFF 0%, #FAF6FA 100%);
  border: 1.5px solid rgba(142, 44, 106, 0.22);
  border-radius: 24px;
  padding: 18px 22px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.st-ai-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 240px;
}
.st-ai-avatar {
  border-radius: 50%;
  padding: 2px;
  background: var(--grad-brand);
  flex-shrink: 0;
}
.st-ai-left h4 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
}
.st-ai-left p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-muted);
}


/* ==========================================================================
   Protect results + Strengthen hub — simple visual layer
   One idea per card: a big number or emoji status, short labels, 3D icons.
   Long explanations sit behind a tap (<details>).
   ========================================================================== */

/* ---------- Shared bits ---------- */
.psx-h { display: flex; align-items: center; gap: 8px; font-size: 1.02rem; font-weight: 800; margin: 18px 0 10px; }
.psx-h > span { font-size: 1.1rem; }
.psx-count { font-style: normal; background: var(--build-bg); color: var(--build); border-radius: var(--radius-full); padding: 1px 10px; font-size: 0.8rem; font-weight: 800; }
.stat-pill.warn { background: #FFF4E5; border-color: #FBD9A8; }

.psx-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.psx-act { flex: 1 1 auto; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 46px; padding: 0 10px; border-radius: 14px; border: 1.5px solid var(--border-subtle); background: #fff; font-family: var(--font-heading); font-weight: 700; font-size: 0.9rem; color: var(--text-primary); cursor: pointer; text-decoration: none; transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast); }
.psx-act:hover { border-color: var(--strengthen); box-shadow: var(--shadow-sm); }
.psx-act:active { transform: scale(0.97); }
.psx-act img { width: 22px; height: 22px; border-radius: 50%; }
.psx-act i { font-size: 1.1rem; }
.psx-act.primary { background: var(--grad-brand); color: #fff; border-color: transparent; box-shadow: var(--shadow-brand); }
.psx-act.primary i { color: #fff; }

/* ---------- Protect: results card ---------- */
#protectSafetyAnalysisCard.protect-safety-summary-card { padding: 18px; border-radius: 26px; box-shadow: var(--shadow-md); }

.psx-hero { display: flex; align-items: center; gap: 16px; border-radius: 22px; padding: 16px; background: var(--grad-brand-soft); position: relative; overflow: hidden; }
.psx-hero.good { background: linear-gradient(135deg, #E8F7EF, #F3EEFA); }
.psx-hero.warn { background: linear-gradient(135deg, #FFF4E5, #F3EEFA); }
.psx-hero.bad { background: linear-gradient(135deg, #FDECF1, #F3EEFA); }
.psx-hero-body { flex: 1; min-width: 0; }
.psx-hero h3 { margin: 0 0 10px; font-size: 1.22rem; font-weight: 800; line-height: 1.25; display: flex; align-items: center; gap: 8px; }
.psx-mood { font-size: 1.6rem; display: inline-block; }
.psx-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.psx-pills .stat-pill { background: rgba(255, 255, 255, 0.85); }

.psx-ring, .sx-mini-ring { --p: 0; --c: var(--protect); position: relative; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--c) calc(var(--p) * 1%), rgba(74, 63, 122, 0.12) 0); transition: --p 0.8s ease; }
.psx-ring { width: 104px; height: 104px; }
.psx-ring::before, .sx-mini-ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: #fff; box-shadow: inset 0 2px 6px rgba(42, 37, 64, 0.06); }
.psx-ring > div { position: relative; text-align: center; line-height: 1; }
.psx-ring b { display: block; font-family: var(--font-heading); font-size: 1.7rem; font-weight: 900; color: var(--text-primary); }
.psx-ring span { font-size: 0.74rem; font-weight: 700; color: var(--text-muted); }

.psx-fixes { display: flex; flex-direction: column; gap: 8px; }
.psx-fix { display: flex; align-items: center; gap: 12px; background: #fff; border: 1.5px solid var(--border-subtle); border-left: 4px solid var(--warning); border-radius: 16px; padding: 10px 10px 10px 12px; }
.psx-fix > img { flex-shrink: 0; }
.psx-fix details { flex: 1; min-width: 0; }
.psx-fix summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.psx-fix summary::-webkit-details-marker { display: none; }
.psx-fix summary b { font-size: 0.95rem; font-weight: 800; line-height: 1.3; }
.psx-fix summary span { font-size: 0.76rem; font-weight: 700; color: var(--text-muted); }
.psx-fix details[open] summary span { color: var(--protect); }
.psx-fix details p { margin: 8px 0 2px; font-size: 0.84rem; line-height: 1.45; color: var(--text-secondary); }
.psx-done { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: 12px; border: 1.5px solid #BFE6D2; background: #E8F7EF; color: var(--success); font-family: var(--font-heading); font-weight: 800; font-size: 0.82rem; cursor: pointer; transition: transform var(--transition-fast), background var(--transition-fast); }
.psx-done:hover { background: var(--success); color: #fff; }
.psx-done:active { transform: scale(0.94); }

.psx-note { display: flex; align-items: center; gap: 12px; border-radius: 16px; padding: 14px 16px; margin-top: 16px; background: var(--protect-bg); color: var(--protect); }
.psx-note.good { background: #E8F7EF; color: var(--success); }
.psx-note span { font-size: 1.5rem; }
.psx-note b { font-size: 0.92rem; }

.psx-habits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 720px) { .psx-habits { grid-template-columns: repeat(6, 1fr); } }
.psx-habit { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 12px 6px; border-radius: 16px; background: var(--bg-card-hover); border: 1px solid var(--border-subtle); }
.psx-habit b { font-size: 0.78rem; font-weight: 700; line-height: 1.25; color: var(--text-secondary); }

/* ---------- Protect: collapsible room check dropdown card ---------- */
.room-check-card {
  border-radius: 24px;
  transition: box-shadow var(--transition-normal);
}
.room-check-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  padding: 4px 0;
  transition: opacity var(--transition-fast);
}
.room-check-dropdown-header:hover {
  opacity: 0.9;
}
.room-check-dropdown-header h3 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.room-check-head-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.room-check-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1.5px solid var(--border-subtle);
  background: #fff;
  color: var(--text-secondary);
  cursor: pointer;
  pointer-events: none;
  transition: transform var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}
.room-check-dropdown-header:hover .room-check-toggle-btn {
  background: var(--bg-card-hover);
  border-color: var(--protect);
  color: var(--protect);
}
.room-check-chevron {
  font-size: 0.9rem;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.room-check-chevron.open {
  transform: rotate(180deg);
}
.room-check-collapse-body {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  animation: fadeIn 0.3s ease both;
}

/* ---------- Strengthen: tabs ---------- */
.sx-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; background: #fff; border: 1px solid var(--border-subtle); border-radius: 22px; padding: 6px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.sx-tab { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px 7px; border: none; background: none; border-radius: 16px; cursor: pointer; font-family: var(--font-heading); font-weight: 700; font-size: 0.74rem; color: var(--text-muted); transition: background var(--transition-normal), color var(--transition-normal), transform var(--transition-fast); min-width: 0; }
.sx-tab img { width: 34px; height: 34px; transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.sx-tab span { max-width: 100%; text-align: center; line-height: 1.15; overflow-wrap: anywhere; }
html:not([lang="en"]) .sx-tab { font-size: 0.66rem; padding-left: 0; padding-right: 0; }
.sx-tab:active { transform: scale(0.95); }
.sx-tab.active { background: var(--grad-brand); color: #fff; box-shadow: var(--shadow-brand); }
.sx-tab.active img { transform: scale(1.12) translateY(-1px); filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2)); }

/* ---------- Strengthen: cards ---------- */
.sx-card { padding: 18px; }
.sx-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.sx-head img { flex-shrink: 0; }
.sx-head h3 { margin: 0; font-size: 1.12rem; font-weight: 800; line-height: 1.25; }
.sx-head p { margin: 2px 0 0; font-size: 0.84rem; color: var(--text-muted); line-height: 1.35; }
.sx-label { margin: 14px 0 8px; font-size: 0.84rem; font-weight: 700; color: var(--text-secondary); }

.sx-result { display: flex; align-items: center; gap: 14px; border-radius: 20px; padding: 14px; background: #E8F7EF; }
.sx-result.warn { background: #FFF4E5; }
.sx-result.bad { background: #FDECF1; }
.sx-big { flex-shrink: 0; width: 86px; height: 86px; border-radius: 50%; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; box-shadow: var(--shadow-sm); }
.sx-big b { font-family: var(--font-heading); font-size: 1.6rem; font-weight: 900; line-height: 1; }
.sx-big span { font-size: 0.62rem; font-weight: 700; color: var(--text-muted); margin-top: 3px; padding: 0 6px; line-height: 1.15; }
.sx-result.good .sx-big b { color: var(--success); }
.sx-result.warn .sx-big b { color: var(--warning); }
.sx-result.bad .sx-big b { color: #B1315D; }
.sx-result.slim .sx-big { width: 74px; height: 74px; }
.sx-result-body { flex: 1; min-width: 0; }
.sx-result-body p { margin: 6px 0 0; font-size: 0.88rem; font-weight: 600; color: var(--text-secondary); line-height: 1.4; }
.sx-status { display: inline-block; font-family: var(--font-heading); font-weight: 800; font-size: 1.02rem; line-height: 1.3; }
.sx-status.good { color: var(--success); }
.sx-status.warn { color: #B45309; }
.sx-status.bad { color: #B1315D; }

.sx-scale { margin: 14px 2px 4px; }
.sx-scale-bar { position: relative; display: flex; height: 10px; border-radius: 10px; overflow: visible; }
.sx-scale-bar i { flex: 1; }
.sx-scale-bar i.bad { background: #F2A7BA; border-radius: 10px 0 0 10px; flex: 1.5; }
.sx-scale-bar i.warn { background: #FBD38D; flex: 1.5; }
.sx-scale-bar i.good { background: #9FDDBD; border-radius: 0 10px 10px 0; flex: 2.5; }
.sx-pin { position: absolute; top: 50%; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 4px solid var(--brand-navy); transform: translate(-50%, -50%); box-shadow: 0 3px 8px rgba(42, 37, 64, 0.3); transition: left 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); }
.sx-scale-labels { display: flex; margin-top: 8px; font-size: 0.74rem; font-weight: 700; color: var(--text-muted); }
.sx-scale-labels span:nth-child(1) { flex: 1.5; }
.sx-scale-labels span:nth-child(2) { flex: 1.5; text-align: center; }
.sx-scale-labels span:nth-child(3) { flex: 2.5; text-align: right; }

.sx-sites { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.sx-site { display: flex; flex-direction: column; align-items: center; gap: 6px; background: var(--bg-card-hover); border: 1px solid var(--border-subtle); border-radius: 16px; padding: 10px 6px; min-width: 0; }
.sx-site > span { font-size: 0.78rem; font-weight: 700; color: var(--text-secondary); text-align: center; }
.sx-stepper { display: flex; align-items: center; gap: 2px; }
.sx-stepper button { width: 28px; height: 32px; border: none; border-radius: 10px; background: #fff; color: var(--strengthen); font-size: 1.1rem; font-weight: 800; cursor: pointer; box-shadow: var(--shadow-sm); }
.sx-stepper button:active { transform: scale(0.9); }
.sx-stepper input { width: 46px; height: 32px; border: none; background: none; text-align: center; font-family: var(--font-heading); font-size: 1rem; font-weight: 800; color: var(--text-primary); -moz-appearance: textfield; appearance: textfield; padding: 0; }
.sx-stepper input::-webkit-outer-spin-button, .sx-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sx-chip-line { margin-top: 12px; display: inline-flex; align-items: center; gap: 6px; background: var(--strengthen-bg); color: var(--strengthen); border-radius: var(--radius-full); padding: 6px 14px; font-size: 0.84rem; font-weight: 700; }

.sx-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sx-kpi { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; background: var(--bg-card-hover); border-radius: 18px; padding: 14px 8px; }
.sx-kpi span { font-size: 0.82rem; font-weight: 700; color: var(--text-secondary); }
.sx-mini-ring { width: 76px; height: 76px; }
.sx-mini-ring::before { inset: 8px; }
.sx-mini-ring b { position: relative; font-family: var(--font-heading); font-size: 1.25rem; font-weight: 900; }

.sx-toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sx-toggle { display: flex; align-items: center; gap: 8px; text-align: left; padding: 10px; border-radius: 14px; border: 1.5px solid var(--border-subtle); background: #fff; cursor: pointer; font-family: inherit; font-weight: 700; font-size: 0.82rem; color: var(--text-secondary); line-height: 1.25; transition: all var(--transition-fast); }
.sx-toggle span { flex: 1; min-width: 0; }
.sx-toggle i { color: var(--border-medium); font-size: 1rem; }
.sx-toggle.on { border-color: var(--strengthen); background: var(--strengthen-bg); color: var(--strengthen); }
.sx-toggle.on i { color: var(--strengthen); animation: checkPop 0.35s ease; }

/* Blood tests */
.sx-labs { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) { .sx-labs { grid-template-columns: 1fr 1fr; } }
.sx-lab { --c: var(--success); background: var(--bg-card-hover); border: 1px solid var(--border-subtle); border-radius: 18px; padding: 14px; }
.sx-lab-top { display: flex; align-items: center; gap: 10px; }
.sx-lab-top b { flex: 1; min-width: 0; font-size: 0.95rem; font-weight: 800; }
.sx-lab-chip { flex-shrink: 0; border-radius: var(--radius-full); padding: 4px 10px; font-size: 0.76rem; font-weight: 800; color: var(--c); background: #fff; border: 1.5px solid var(--c); transition: color 0.2s, border-color 0.2s; }
.sx-lab-val { margin: 8px 0 2px; }
.sx-lab-val b { font-family: var(--font-heading); font-size: 1.7rem; font-weight: 900; color: var(--c); transition: color 0.2s; }
.sx-lab-val small { font-size: 0.8rem; font-weight: 700; color: var(--text-muted); }
.sx-range { width: 100%; accent-color: var(--c); margin: 4px 0; height: 26px; cursor: pointer; }
.sx-lab-tip { margin: 2px 0 0; font-size: 0.84rem; font-weight: 600; color: var(--text-secondary); line-height: 1.4; }

/* Medicines */
.sx-timeline { display: flex; align-items: stretch; gap: 6px; }
.sx-tl-step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; background: var(--strengthen-bg); border-radius: 18px; padding: 12px 6px; min-width: 0; }
.sx-tl-step.ok { background: #E8F7EF; }
.sx-tl-emoji { font-size: 1.8rem; line-height: 1; }
.sx-tl-step b { font-family: var(--font-heading); font-size: 1.3rem; font-weight: 900; color: var(--success); height: 36px; display: flex; align-items: center; }
.sx-tl-step input { height: 36px; width: 100%; max-width: 120px; border: 1.5px solid rgba(142, 44, 106, 0.25); border-radius: 10px; background: #fff; text-align: center; font-family: var(--font-heading); font-size: 1.05rem; font-weight: 800; color: var(--strengthen); padding: 0 4px; }
.sx-tl-step small { font-size: 0.78rem; font-weight: 700; color: var(--text-secondary); }
.sx-tl-gap { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; position: relative; padding: 0 2px; }
.sx-tl-gap span { position: relative; z-index: 1; background: #fff; border: 1.5px dashed var(--border-medium); border-radius: var(--radius-full); padding: 4px 8px; font-size: 0.74rem; font-weight: 800; color: var(--text-secondary); white-space: nowrap; }

.sx-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sx-duo-card { display: flex; flex-direction: column; gap: 6px; border-radius: 16px; padding: 12px; background: #FFF8EE; border: 1px solid #FBE3C0; }
.sx-duo-card.good { background: #EEF9F3; border-color: #C9EBD9; }
.sx-duo-card b { font-size: 0.9rem; font-weight: 800; line-height: 1.25; }
.sx-duo-card span { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); line-height: 1.35; }

.sx-meds { display: flex; flex-direction: column; gap: 10px; }
.sx-med { background: var(--bg-card-hover); border: 1px solid var(--border-subtle); border-radius: 18px; padding: 14px; }
.sx-med-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.sx-med-top b { font-size: 1rem; font-weight: 800; }
.sx-rules { display: flex; flex-wrap: wrap; gap: 6px; }
.sx-rules span { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--border-subtle); border-radius: var(--radius-full); padding: 5px 12px 5px 8px; font-size: 0.8rem; font-weight: 700; color: var(--text-secondary); }
.sx-rules em { font-style: normal; font-size: 1rem; }
.sx-more { margin-top: 10px; }
.sx-more summary { cursor: pointer; font-size: 0.8rem; font-weight: 800; color: var(--strengthen); }
.sx-more p { margin: 6px 0 0; font-size: 0.82rem; color: var(--text-secondary); line-height: 1.45; }

/* Spine */
.sx-height { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.sx-hbox { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; background: var(--bg-card-hover); border: 1px solid var(--border-subtle); border-radius: 16px; padding: 10px 8px; min-width: 0; }
.sx-hbox span { font-size: 0.78rem; font-weight: 700; color: var(--text-muted); }
.sx-hbox input { width: 100%; max-width: 110px; height: 40px; border: 1.5px solid var(--border-subtle); border-radius: 12px; background: #fff; text-align: center; font-family: var(--font-heading); font-size: 1.3rem; font-weight: 800; color: var(--text-primary); }
.sx-hbox input:focus { border-color: var(--strengthen); outline: none; }
.sx-hbox small { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); }
.sx-harrow { font-size: 1.3rem; color: var(--text-muted); font-weight: 800; }

.sx-moves { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (min-width: 900px) { .sx-moves { grid-template-columns: repeat(4, 1fr); } }
.sx-move { display: flex; flex-direction: column; gap: 6px; background: var(--bg-card-hover); border: 1px solid var(--border-subtle); border-radius: 18px; padding: 12px; min-width: 0; }
.sx-move-top { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 2px; }
.sx-move-top b { font-size: 0.9rem; font-weight: 800; line-height: 1.25; }
.sx-dont, .sx-do { display: flex; align-items: flex-start; gap: 6px; border-radius: 10px; padding: 6px 8px; font-size: 0.8rem; font-weight: 700; line-height: 1.3; }
.sx-dont { background: #FDECF1; color: #B1315D; }
.sx-do { background: #E8F7EF; color: #16774A; }
.sx-dont span, .sx-do span { flex-shrink: 0; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 0.7rem; font-weight: 900; color: #fff; margin-top: 1px; }
.sx-dont span { background: #DC2626; }
.sx-do span { background: var(--success); }

.sx-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; counter-reset: sxstep; }
.sx-steps li { counter-increment: sxstep; display: flex; align-items: center; gap: 12px; background: var(--bg-card-hover); border-radius: 16px; padding: 10px 12px; position: relative; }
.sx-steps li em { font-style: normal; flex-shrink: 0; width: 44px; height: 44px; border-radius: 14px; background: #fff; display: grid; place-items: center; font-size: 1.4rem; box-shadow: var(--shadow-sm); position: relative; }
.sx-steps li em::after { content: counter(sxstep); position: absolute; top: -6px; left: -6px; width: 20px; height: 20px; border-radius: 50%; background: var(--strengthen); color: #fff; font-size: 0.7rem; font-weight: 800; display: grid; place-items: center; font-family: var(--font-heading); }
.sx-steps li span { font-size: 0.88rem; font-weight: 700; line-height: 1.35; color: var(--text-primary); }
.sx-call { margin-top: 12px; display: flex; align-items: center; justify-content: center; gap: 10px; height: 48px; border-radius: 14px; background: #DC2626; color: #fff; font-family: var(--font-heading); font-weight: 800; font-size: 0.95rem; text-decoration: none; box-shadow: 0 8px 18px -8px rgba(220, 38, 38, 0.6); }
.sx-call:active { transform: scale(0.98); }

/* Doctor */
.sx-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (min-width: 720px) { .sx-stats { grid-template-columns: repeat(4, 1fr); } }
.sx-stat { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; background: var(--bg-card-hover); border: 1px solid var(--border-subtle); border-radius: 16px; padding: 10px 12px; }
.sx-stat img { grid-row: span 2; }
.sx-stat span { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); }
.sx-stat b { font-family: var(--font-heading); font-size: 1.05rem; font-weight: 800; }
.sx-asks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sx-asks li { display: flex; align-items: center; gap: 12px; background: #fff; border: 1.5px solid var(--border-subtle); border-radius: 16px; padding: 10px 12px; }
.sx-asks em { font-style: normal; flex-shrink: 0; width: 38px; height: 38px; border-radius: 12px; background: var(--strengthen-bg); display: grid; place-items: center; font-size: 1.15rem; }
.sx-asks span { font-size: 0.88rem; font-weight: 700; line-height: 1.35; }

/* ---------- Entrance motion (only when the tab/screen opens) ---------- */
.sx-anim .st-card, .psx-anim .psx-hero { animation: popIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.sx-anim .st-card:nth-child(2) { animation-delay: 0.08s; }
.sx-anim .st-card:nth-child(3) { animation-delay: 0.16s; }
.sx-anim .sx-lab, .sx-anim .sx-move, .sx-anim .sx-steps li, .sx-anim .sx-asks li, .sx-anim .sx-med,
.psx-anim .psx-fix, .psx-anim .psx-habit { animation: fadeUp 0.4s ease both; animation-delay: calc(0.12s + var(--i, 0) * 50ms); }
.sx-anim .psx-ring, .sx-anim .sx-mini-ring, .psx-anim .psx-ring { animation: ringFill 0.9s ease both; }
.psx-anim .psx-mood, .sx-anim .sx-big { animation: checkPop 0.5s 0.2s ease both; }
@keyframes ringFill { from { --p: 0; } }
.sx-tab.active img, .psx-habit:hover img, .sx-move:hover img { animation: wiggle 0.5s ease; }

@media (max-width: 400px) {
  .psx-ring { width: 92px; height: 92px; }
  .psx-ring b { font-size: 1.45rem; }
  .psx-hero { gap: 12px; padding: 14px; }
  .psx-hero h3 { font-size: 1.08rem; }
  .psx-done { padding: 0 10px; }
  .sx-tab { font-size: 0.68rem; }
  .sx-tab img { width: 30px; height: 30px; }
  .sx-big { width: 78px; height: 78px; }
}

/* Long words (Tamil, Malayalam, Kannada…) must wrap instead of overflowing. */
.psx-hero h3 { display: block; overflow-wrap: anywhere; }
.psx-mood { margin-right: 4px; vertical-align: -2px; }
.psx-ring span { display: block; max-width: 66px; margin: 2px auto 0; font-size: 0.66rem; line-height: 1.1; overflow-wrap: anywhere; }
.psx-fix summary b, .sx-head h3, .sx-move-top b, .sx-med-top b { overflow-wrap: anywhere; }
.psx-done { width: 42px; height: 42px; padding: 0; justify-content: center; border-radius: 50%; font-size: 1rem; }

/* ==========================================================================
   Accounts: login entry points, profile account box, history calendar
   ========================================================================== */
.onboarding-top-actions { display: flex; align-items: center; gap: 4px; }
.onboarding-login-btn { color: var(--build); display: inline-flex; align-items: center; gap: 6px; }
#view-auth .auth-card { position: relative; }
.auth-back { position: absolute; top: 14px; left: 14px; display: inline-flex; margin: 0; z-index: 1; }
.auth-back[hidden], .profile-data-actions .link-btn[hidden] { display: none; }
.auth-card .step-chip[hidden] { display: none; }

.calendar-month-heading.history-link { background: none; border: none; padding: 4px 6px 4px 0; cursor: pointer; border-radius: 10px; }
.calendar-month-heading.history-link > i { font-size: 0.62rem; color: var(--text-muted); }
.calendar-month-heading.history-link:hover > i { color: var(--build); }

.profile-account { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.profile-account:empty { display: none; }
.pa-row { display: flex; align-items: center; gap: 12px; background: var(--bg-card-hover); border: 1px solid var(--border-subtle); border-radius: 16px; padding: 12px 14px; text-align: left; }
.pa-row b { display: block; font-size: 0.95rem; }
.pa-row span:not(.pa-icon) { font-size: 0.8rem; color: var(--text-muted); }
.pa-icon { flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #E8F7EF; color: var(--success); font-size: 1.05rem; }
.pa-icon.guest { background: var(--build-bg); color: var(--build); }
.pa-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pa-actions .btn { flex: 1; justify-content: center; }

button.history-entry { width: 100%; border: none; text-align: left; font-family: inherit; margin: 14px 0 0; }

.history-sheet { max-width: 560px; }
.hx-month { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 12px; }
.hx-month b { font-family: var(--font-heading); font-size: 1.05rem; }
.hx-month .cal-nav-btn { width: 36px; height: 36px; font-size: 0.8rem; }
.hx-month .cal-nav-btn:disabled { opacity: 0.35; cursor: default; }
.hx-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.hx-stats div { background: var(--bg-card-hover); border: 1px solid var(--border-subtle); border-radius: 16px; padding: 10px 6px; text-align: center; }
.hx-stats b { display: block; font-family: var(--font-heading); font-size: 1.4rem; font-weight: 900; color: var(--text-primary); }
.hx-stats span { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); }
.hx-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.hx-wd { text-align: center; font-size: 0.7rem; font-weight: 800; color: var(--text-muted); padding-bottom: 2px; }
.hx-cell { aspect-ratio: 1; border-radius: 12px; border: 2px solid transparent; display: grid; place-items: center; font-family: var(--font-heading); font-weight: 800; font-size: 0.86rem; cursor: pointer; background: var(--bg-surface-elevated); color: var(--text-secondary); transition: transform var(--transition-fast); padding: 0; }
.hx-cell:not(:disabled):active { transform: scale(0.92); }
.hx-cell.empty { background: none; cursor: default; }
.hx-cell.complete { background: #1E9E62; color: #fff; }
.hx-cell.partial { background: #FBD38D; color: #7A4B00; }
.hx-cell.missed { background: #EEEBF3; color: #9A93AB; }
.hx-cell.today { background: #fff; border-color: var(--border-medium); }
.hx-cell.future, .hx-cell.none { background: none; color: #C9C3D6; cursor: default; }
.hx-cell.is-today { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--build); }
.hx-cell.selected { border-color: var(--brand-navy); }
.hx-legend { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin: 12px 0 4px; font-size: 0.76rem; font-weight: 700; color: var(--text-secondary); }
.hx-legend span { display: inline-flex; align-items: center; gap: 6px; }
.hx-legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.hx-legend i.complete { background: #1E9E62; }
.hx-legend i.partial { background: #FBD38D; }
.hx-legend i.missed { background: #EEEBF3; border: 1px solid #DCD6E6; }
.hx-note { text-align: center; font-size: 0.8rem; color: var(--text-muted); margin: 6px 0; }
.hx-detail { margin-top: 14px; background: #fff; border: 1.5px solid var(--border-subtle); border-radius: 20px; padding: 14px 16px; animation: fadeUp 0.3s ease both; }
.hx-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.hx-detail-head b { font-family: var(--font-heading); font-size: 1rem; }
.hx-chip { border-radius: var(--radius-full); padding: 4px 12px; font-size: 0.78rem; font-weight: 800; background: var(--bg-surface-elevated); color: var(--text-secondary); }
.hx-chip.complete { background: #E8F7EF; color: #16774A; }
.hx-chip.partial { background: #FFF4E5; color: #9A5B00; }
.hx-detail h5 { display: flex; align-items: center; gap: 6px; margin: 12px 0 6px; font-size: 0.92rem; font-weight: 800; }
.hx-detail h5 em { font-style: normal; margin-left: auto; font-size: 0.8rem; color: var(--text-muted); }
.hx-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.hx-list li { display: flex; align-items: center; gap: 10px; font-size: 0.88rem; font-weight: 600; color: var(--text-muted); }
.hx-list li.done { color: var(--text-primary); }
.hx-tick { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border-medium); display: grid; place-items: center; font-size: 0.66rem; color: #fff; }
.hx-list li.done .hx-tick { background: var(--success); border-color: var(--success); }
.hx-list li.hx-empty { font-style: italic; }
.hx-guest { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px; border-radius: 16px; background: linear-gradient(120deg, #F3EEFA, #FDECF1); }
.hx-guest > span { font-size: 1.5rem; }
.hx-guest > div { flex: 1; min-width: 0; }
.hx-guest b { display: block; font-size: 0.92rem; }
.hx-guest div span { font-size: 0.78rem; color: var(--text-muted); }

/* ==========================================================================
   Strengthen v3.7: the user's bone health file (forms, records, medicines)
   ========================================================================== */
.psx-hero.todo { background: linear-gradient(135deg, var(--protect-bg), #F7F5FB); }
.psx-ring b.sm { font-size: 1.35rem; }
.psx-start { width: 100%; margin-top: 10px; flex: none; }
.psx-note.warn { background: #FFF4E5; color: #9A5B00; }
.psx-note.sx-tip { margin: 0 0 16px; background: #FFF8E6; color: #7A5400; }

.sx-head { position: relative; }
.sx-head > div { flex: 1; min-width: 0; }
.sx-add { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: var(--radius-full); border: none; background: var(--strengthen-bg); color: var(--strengthen); font-family: var(--font-heading); font-weight: 800; font-size: 0.84rem; cursor: pointer; }
.sx-add:active { transform: scale(0.96); }

.sx-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 10px 8px 4px; }
.sx-empty-icon { font-size: 2.6rem; line-height: 1; animation: floatY 3.2s ease-in-out infinite; }
.sx-empty b { font-family: var(--font-heading); font-size: 1.05rem; }
.sx-empty p { margin: 0 0 6px; font-size: 0.88rem; color: var(--text-secondary); line-height: 1.4; }
.sx-empty .psx-act { flex: none; min-width: 200px; }
.sx-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-bottom: 8px; }
.sx-pills span { display: inline-flex; align-items: center; gap: 6px; background: var(--bg-card-hover); border: 1px solid var(--border-subtle); border-radius: var(--radius-full); padding: 4px 12px 4px 6px; font-size: 0.8rem; font-weight: 700; color: var(--text-secondary); }

.sx-form { background: var(--strengthen-bg); border-radius: 18px; padding: 14px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 10px; animation: fadeUp 0.3s ease both; }
.sx-form-title { font-family: var(--font-heading); font-size: 1rem; }
.sx-field { display: flex; flex-direction: column; gap: 4px; font-size: 0.8rem; font-weight: 700; color: var(--text-secondary); min-width: 0; }
.sx-field small { font-weight: 600; color: var(--text-muted); }
.sx-field input { height: 44px; border: 1.5px solid var(--border-subtle); border-radius: 12px; background: #fff; padding: 0 12px; font-family: var(--font-heading); font-size: 1rem; font-weight: 700; color: var(--text-primary); min-width: 0; width: 100%; box-sizing: border-box; }
.sx-field input:focus { outline: none; border-color: var(--strengthen); }
.sx-form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sx-form-grid.two { grid-template-columns: 1fr 1fr; }
.sx-hint { margin: 0; font-size: 0.8rem; color: var(--text-muted); line-height: 1.4; }
.sx-form-actions { display: flex; gap: 8px; }
.sx-check { display: flex; align-items: center; gap: 8px; font-size: 0.84rem; font-weight: 600; color: var(--text-secondary); }
.sx-check input { width: 18px; height: 18px; accent-color: var(--strengthen); }
.sx-kind-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sx-kind-chips button { height: 34px; padding: 0 12px; border-radius: var(--radius-full); border: 1.5px solid var(--border-subtle); background: #fff; font-family: inherit; font-weight: 700; font-size: 0.8rem; color: var(--text-secondary); cursor: pointer; }
.sx-kind-chips button.on { border-color: var(--strengthen); color: var(--strengthen); box-shadow: 0 0 0 2px var(--strengthen-bg); }

.sx-site b { font-family: var(--font-heading); font-size: 1.15rem; font-weight: 900; color: var(--text-primary); }
.sx-trend { margin-top: 12px; padding: 8px 12px; border-radius: 12px; background: var(--bg-card-hover); font-size: 0.86rem; font-weight: 700; color: var(--text-secondary); }
.sx-trend.good { background: #E8F7EF; color: #16774A; }
.sx-trend.bad { background: #FDECF1; color: #B1315D; }

.sx-history { margin-top: 14px; border-top: 1px solid var(--border-subtle); padding-top: 10px; }
.sx-history summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; font-size: 0.86rem; font-weight: 800; color: var(--text-secondary); }
.sx-history summary::-webkit-details-marker { display: none; }
.sx-history summary em { font-style: normal; background: var(--bg-surface-elevated); border-radius: var(--radius-full); padding: 0 8px; font-size: 0.76rem; }
.sx-history ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sx-history li { display: flex; align-items: center; gap: 10px; background: var(--bg-card-hover); border-radius: 12px; padding: 8px 10px; }
.sx-history li > span { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 0.8rem; color: var(--text-muted); }
.sx-history li b { font-size: 0.88rem; color: var(--text-primary); }
.sx-dot { flex-shrink: 0; width: 10px; height: 10px; border-radius: 50%; background: #1E9E62; }
.sx-dot.warn { background: #D97706; }
.sx-dot.bad { background: #DC2626; }
.sx-del { flex-shrink: 0; width: 32px; height: 32px; border-radius: 10px; border: none; background: none; color: var(--text-muted); cursor: pointer; }
.sx-del:hover { background: #FDECF1; color: #B1315D; }

.sx-lab.none { opacity: 0.75; }
.sx-lab-val em { font-style: normal; margin-left: 8px; font-size: 0.78rem; font-weight: 700; color: var(--text-muted); }

.sx-med-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sx-med-row { display: flex; align-items: center; gap: 10px; background: #fff; border: 1.5px solid var(--border-subtle); border-radius: 16px; padding: 10px 8px 10px 12px; transition: border-color 0.2s, background 0.2s; }
.sx-med-row > em { font-style: normal; font-size: 1.5rem; flex-shrink: 0; }
.sx-med-row > span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sx-med-row b { font-size: 0.95rem; overflow-wrap: anywhere; }
.sx-med-row small { font-size: 0.78rem; color: var(--text-muted); font-weight: 600; }
.sx-med-row.done { background: #F2FAF6; border-color: #BFE6D2; }
.sx-med-row.later { opacity: 0.7; }
.sx-taken { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: var(--radius-full); border: 1.5px solid var(--border-medium); background: #fff; font-family: var(--font-heading); font-weight: 800; font-size: 0.84rem; color: var(--text-secondary); cursor: pointer; }
.sx-taken.on { background: var(--success); border-color: var(--success); color: #fff; animation: checkPop 0.35s ease; }
.sx-tl-step b.plain { color: var(--strengthen); }

.sx-visit { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sx-visit input { height: 44px; border: 1.5px solid var(--border-subtle); border-radius: 12px; padding: 0 12px; font-family: var(--font-heading); font-size: 1rem; font-weight: 700; color: var(--text-primary); background: #fff; }
.sx-visit .sx-chip-line { margin-top: 0; }
.sx-asks li.mine { border-style: dashed; }
.sx-asks li .sx-del { margin-left: auto; }
.sx-asks.compact li { padding: 8px 12px; }
.sx-own-q { display: flex; gap: 8px; margin-top: 10px; }
.sx-own-q input { flex: 1; min-width: 0; height: 46px; border: 1.5px solid var(--border-subtle); border-radius: 14px; padding: 0 14px; font-family: inherit; font-size: 0.92rem; }
.sx-own-q input:focus { outline: none; border-color: var(--strengthen); }
.sx-own-q .psx-act { flex: none; width: 46px; min-width: 0; padding: 0; }
@media (min-width: 720px) { .sx-stats { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 400px) { .sx-form-grid { grid-template-columns: 1fr 1fr; } }

/* ==========================================================================
   DESKTOP & WIDE-SCREEN LAYOUT HARMONY
   ========================================================================== */
@media (min-width: 768px) {
  body {
    background-color: #F7F6F9;
  }
  .app-header {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 1px 3px rgba(42, 37, 64, 0.04);
  }
  .app-container {
    max-width: var(--max-width-app, 680px);
    padding: 0 20px;
  }
  .assessment-container-card {
    max-width: var(--max-width-app, 680px);
    padding: 20px 12px 140px;
  }
  .wiz-footer {
    width: min(var(--max-width-app, 680px), calc(100% - 32px));
    max-width: var(--max-width-app, 680px);
    padding: 18px 0 6px;
  }
  .pillar-bottom-nav {
    width: min(var(--max-width-app, 680px), calc(100% - 32px));
    max-width: var(--max-width-app, 680px);
  }
}

@media (max-width: 400px) { .sx-form-grid { grid-template-columns: 1fr 1fr; } }

/* Strengthen Mode Switcher Bar */
.sx-mode-bar { display: flex; justify-content: center; margin: 0 0 16px; }
.sx-mode-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 18px; font-size: 0.85rem; font-weight: 600; border-radius: 20px; background: rgba(255,255,255,0.9); border: 1px solid var(--border-subtle, #e2e8f0); color: var(--primary, #0d9488); box-shadow: 0 2px 6px rgba(0,0,0,0.04); transition: all 0.2s ease; cursor: pointer; }
.sx-mode-btn:hover { background: var(--primary, #0d9488); color: #fff; border-color: var(--primary, #0d9488); transform: translateY(-1px); }

