/* ==================================================
   ALPHA HEIGHT METHOD — COMPONENTS STYLESHEET
   Sequential Initialization Console / Mission-HUD Aesthetic
   ================================================== */

/* ==================================================
   0. INITIAL BOOT PRELOADER & DIAGNOSTIC LOADING
   ================================================== */
body.preloader-active, html.preloader-active {
  overflow: hidden !important;
  touch-action: none;
}

.initial-preloader-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 10, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.45s;
  user-select: none;
}

.initial-preloader-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-terminal {
  width: 100%;
  max-width: 460px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 28px 24px;
  position: relative;
}

.preloader-terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.preloader-readout {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.preloader-line {
  display: flex;
  align-items: center;
  color: var(--text-muted);
  opacity: 0.4;
  transition: opacity 0.2s, color 0.2s;
}

.preloader-line.active {
  opacity: 1;
  color: var(--white);
}

.line-tag {
  color: var(--white);
  font-weight: 700;
  margin-right: 6px;
}

.line-dots {
  flex: 1;
  margin: 0 8px;
  letter-spacing: 0.15em;
  color: var(--border);
  overflow: hidden;
  white-space: nowrap;
}

.line-status {
  min-width: 44px;
  text-align: right;
  color: var(--text-muted);
}

.line-status.ok {
  color: var(--ok);
  font-weight: 700;
}

.preloader-progress-track {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
}

.preloader-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--red);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Diagnostic Loading Screen Modal */
.loading-screen-modal {
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 10, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.loading-dialog {
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
}

.loading-dialog-header {
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
  padding-bottom: 4px;
}

.loading-readout-feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 150px;
  margin-bottom: 12px;
}

.loading-readout-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--white);
  animation: fadeInLine 0.2s ease-out;
}

@keyframes fadeInLine {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.readout-check {
  color: var(--ok);
  font-weight: 700;
}

.readout-text {
  letter-spacing: 0.05em;
}

.loading-sweep-track {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--border);
  overflow: hidden;
}

.loading-sweep-line {
  width: 35%;
  height: 100%;
  background: var(--red);
  animation: sweepLine 1.2s infinite ease-in-out;
}

@keyframes sweepLine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* ==================================================
/* ==================================================
   1. GLOBAL HEADER (#main-navbar)
   ================================================== */
header,
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: calc(56px + env(safe-area-inset-top, 0px));
  box-sizing: border-box;
  padding: 0 14px;
  padding-top: env(safe-area-inset-top, 0px);
  padding-left: calc(14px + env(safe-area-inset-left, 0px));
  padding-right: calc(14px + env(safe-area-inset-right, 0px));
  border-bottom: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: linear-gradient(180deg,
    rgba(8, 8, 10, 0.95) 0%,
    rgba(8, 8, 10, 0.92) 62%,
    rgba(8, 8, 10, 0.55) 84%,
    rgba(8, 8, 10, 0.00) 100%);
  transition: transform .22s ease;
  will-change: transform;
}

header[data-chrome-hidden],
.navbar[data-chrome-hidden] {
  transform: translateY(-100%);
}

.nav-sys-indicator {
  flex: 0 0 auto;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.nav-sys-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--white);
  letter-spacing: 0.12em;
}

.nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.nav-lang-toggle {
  display: inline-flex;
  align-items: center;
  padding: 2px 3px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-sizing: border-box;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.nav-lang-btn {
  background: transparent;
  border: none;
  padding: 4px 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  transition: color 0.15s ease, background-color 0.15s ease;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-lang-btn[data-script="deva"],
.nav-lang-btn[data-nav-lang="hi"] {
  font-family: var(--font-deva);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 3px 6px;
}

.nav-lang-btn:hover {
  color: var(--white);
}

.nav-lang-btn.active,
.nav-lang-btn[aria-checked="true"] {
  background: var(--red);
  color: var(--white);
}

.nav-lang-sep {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--border);
  margin: 0 1px;
  user-select: none;
  opacity: 0.8;
}

.header-unlock-btn {
  flex: 0 0 auto;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  font-size: 13px;
  letter-spacing: .06em;
}

.decoding-text {
  font-family: var(--font-mono) !important;
  letter-spacing: 0.02em;
}

/* ==================================================
   2. HERO SECTION
   ================================================== */
.hero-wrapper {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: clamp(220px, 72vw, 320px);
  padding-bottom: 48px;
  z-index: 10;
}

.hero-grid {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 680px;
}

.hero-text-col {
  background: rgba(8, 8, 10, 0.78);
  border: 1px solid var(--border);
  padding: 36px 32px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hero-headline {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  color: var(--white);
  margin-bottom: 16px;
  line-height: 1.15;
}

.hero-desc {
  font-size: clamp(0.95rem, 1.2vw, 1.05rem);
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Hindi Availability Badge (Hero) */
.lang-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 20px;
  padding: 8px 14px 8px 11px;
  background: rgba(59, 224, 140, 0.10);
  border: 1px solid rgba(59, 224, 140, 0.30);
  border-radius: 999px;
  max-width: 100%;
}

.lang-badge__dot {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
  animation: langPulse 2.4s ease-in-out infinite;
}

.lang-badge__deva {
  flex: 0 0 auto;
  font-family: var(--font-deva);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.35;
  color: var(--ok);
}

.lang-badge__text {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12.5px;
  line-height: 1.3;
  letter-spacing: .01em;
  color: var(--white);
}

@keyframes langPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

@media (prefers-reduced-motion: reduce) {
  .lang-badge__dot {
    animation: none;
    opacity: 1;
  }
}

/* ==================================================
   2.5. SOCIAL PROOF TRUST STRIP (COMPACT BRIDGE)
   ================================================== */
.trust-strip-wrapper {
  position: relative;
  z-index: 10;
  padding: 0 24px;
  margin-top: -16px;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .trust-strip-wrapper {
    padding: 0 16px;
    margin-top: -12px;
    margin-bottom: 16px;
  }
}

.trust-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 680px;
  background: rgba(16, 16, 19, 0.88);
  border: 1px solid var(--border);
  padding: 12px 20px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-sizing: border-box;
}

.trust-strip__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.trust-strip__status .badge-dot {
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
}

.trust-strip__divider {
  width: 1px;
  height: 22px;
  background: var(--border);
  flex-shrink: 0;
}

.trust-strip__metrics {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.trust-metric {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}

.trust-metric__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ok);
  line-height: 1;
  transform: translateY(1px);
}

.trust-stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--red);
  line-height: 1;
  transform: translateY(1px);
}

.trust-star {
  width: 11px;
  height: 11px;
  display: inline-block;
  flex-shrink: 0;
}

.trust-metric__val {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.trust-metric__denom {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.trust-metric__lbl {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.trust-metric__sep {
  color: var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
  user-select: none;
}

@media (max-width: 640px) {
  .trust-strip {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
  }

  .trust-strip__divider {
    display: none;
  }

  .trust-strip__metrics {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    border-top: 1px solid var(--border);
    padding-top: 10px;
  }

  .trust-metric {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .trust-metric__sep {
    display: none;
  }
}

/* ==================================================
   3. WHY & AUDIENCE GRIDS (TIER 2 PLATES)
   ================================================== */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.icon-box {
  width: 40px;
  height: 40px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  transition: border-color var(--transition-fast);
}

.plate:hover .icon-box {
  border-color: var(--hud);
  color: var(--red);
}

.card-h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}

/* ==================================================
   4. HOW IT WORKS TIMELINE (TIER 2 PLATES)
   ================================================== */
.timeline-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 36px;
}

/* ==================================================
   5. ASSESSMENT WIZARD PANEL (TIER 1 FRAMED)
   ================================================== */
.assessment-panel {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  position: relative;
}

.progress-header {
  margin-bottom: 28px;
}

.step-indicator-text {
  margin-bottom: 10px;
}

.wizard-progress-track {
  width: 100%;
  height: 2px;
  background: var(--border);
  position: relative;
}

.wizard-progress-fill {
  height: 100%;
  background: var(--red);
  width: 33.33%;
  transition: width var(--transition-normal);
}

.wizard-progress-tick {
  position: absolute;
  top: -3px;
  width: 8px;
  height: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  transform: translateX(-50%);
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.wizard-progress-tick.passed {
  background: var(--white);
  border-color: var(--white);
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 1rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-control:focus {
  border-color: var(--white);
}

.radio-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.lifestyle-radio-group {
  grid-template-columns: 1fr;
}

.radio-option {
  padding: 12px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.92rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
  user-select: none;
}

.radio-marker {
  width: 6px;
  height: 6px;
  background: var(--border);
  flex-shrink: 0;
  transition: background var(--transition-fast), box-shadow var(--transition-fast);
}

.radio-option:hover {
  border-color: var(--hud);
}

.radio-option.selected {
  border-color: var(--red);
  background: var(--red-soft);
}

.radio-option.selected .radio-marker {
  background: var(--red);
  box-shadow: 0 0 6px var(--red);
}

.unit-preference-group {
  margin-bottom: 20px;
}

.unit-toggle-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.wizard-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  gap: 12px;
}

.medical-disclaimer-note {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 20px;
  line-height: 1.5;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

/* ==================================================
   6. RESTYLED STEP 01 AGE PICKER (.age-field)
   ================================================== */
.age-field { display: flex; flex-direction: column; }

.age-field__label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em;
  color: var(--label);
  text-transform: uppercase;
}

.age-value {
  align-self: center;
  margin-top: 14px;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(32px, 9.5vw, 40px); line-height: 1;
  color: var(--white);
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.age-value i {
  display: block; margin-top: 6px;
  font-family: var(--font-mono); font-style: normal; font-weight: 400;
  font-size: 10px; letter-spacing: .14em; color: var(--label);
  text-transform: uppercase;
}

.age-row {
  display: flex; flex-wrap: nowrap; align-items: center;
  gap: 4px;
  margin-top: 12px;
}

.age-arrow {
  flex: 0 0 auto;
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 0; padding: 0;
  color: var(--text-muted);
  font-family: var(--font-mono); font-size: 18px; line-height: 1;
  cursor: pointer;
}
.age-arrow:active { color: var(--white); }
.age-arrow:focus-visible { outline: 1px solid var(--hud); outline-offset: 2px; }

.age-view {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
  overflow: hidden;
}

.age-strip {
  height: 100%;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  mask-image: linear-gradient(90deg,
    transparent 0, #000 16%, #000 84%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg,
    transparent 0, #000 16%, #000 84%, transparent 100%);
}
.age-strip::-webkit-scrollbar { display: none; }

.age-strip__track {
  display: flex;
  height: 100%;
  padding: 0 calc(50% - 17px);
}

.age-tick {
  position: relative;
  flex: 0 0 34px;
  width: 34px;
  height: 100%;
  scroll-snap-align: center;
}

.age-tick__num {
  position: absolute; top: 2px; left: 0; right: 0;
  text-align: center;
  font-family: var(--font-mono); font-size: 11px; line-height: 1;
  color: var(--label);
  font-variant-numeric: tabular-nums;
}

.age-tick::before {
  content: '';
  position: absolute; bottom: 6px; left: 50%;
  transform: translateX(-50%);
  width: 1px; height: 10px;
  background: var(--hud);
}
.age-tick--major::before {
  width: 2px; height: 16px;
  background: rgba(255, 255, 255, 0.5);
}

.age-tick--on .age-tick__num { color: var(--white); font-weight: 500; }

.age-band {
  position: absolute; left: 50%; bottom: 0;
  transform: translateX(-50%);
  width: 30px; height: 100%;
  background: linear-gradient(0deg,
    rgba(225, 29, 46, 0.16) 0%,
    rgba(225, 29, 46, 0.06) 55%,
    transparent 100%);
  pointer-events: none; z-index: 1;
}

.age-mark {
  position: absolute; left: 50%; bottom: 6px;
  transform: translateX(-50%);
  width: 3px; height: 20px;
  background: var(--red);
  pointer-events: none; z-index: 2;
}

/* --- SCREEN READER UTILITY --- */
.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;
}

/* --- NAMED PROGRESS STRIP (SUBSTEP NAV) --- */
.substep-nav{
  display:flex;
  gap:6px;
  margin:0 0 18px;
}
.substep-seg{
  flex:1 1 0;
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:6px;
  font-family:var(--font-mono);
  font-weight:500;
  font-size:10px;
  letter-spacing:.1em;
  line-height:1;
  text-align:left;
  white-space:nowrap;
}
.substep-seg i{
  display:block;
  height:2px;
  border-radius:2px;
  background:var(--border);
}
.substep-seg[data-state="done"]      { color:var(--text-muted); }
.substep-seg[data-state="done"] i    { background:var(--hud); }
.substep-seg[data-state="now"]       { color:var(--white); }
.substep-seg[data-state="now"] i     { background:var(--red); }
.substep-seg[data-state="next"]      { color:#5A5A63; }
.substep-seg[data-state="next"] i    { background:var(--border); }

/* --- STEP 02 TYPOGRAPHY HIERARCHY --- */
.substep-title{
  margin:0 0 5px;
  font-family:var(--font-display);
  font-weight:700;
  font-size:clamp(20px, 5.6vw, 24px);
  line-height:1.15;
  letter-spacing:.02em;
  color:var(--white);
}
.substep-help{
  margin:0 0 16px;
  font-family:var(--font-body);
  font-weight:400;
  font-size:12.5px;
  line-height:1.5;
  color:var(--text-muted);
}

/* --- SUBSTEP ENTRANCE ANIMATION --- */
.substep-panel[data-entering]{
  animation:substepIn .34s cubic-bezier(.22,.61,.36,1) both;
}
@keyframes substepIn{
  from{ opacity:0; transform:translateY(10px); }
  to  { opacity:1; transform:translateY(0); }
}
@media (prefers-reduced-motion: reduce){
  .substep-panel[data-entering]{ animation:none; }
}

/* --- VERTICAL RULER HEIGHT PICKER SPECIFICATION --- */
.vruler-field {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vruler-field__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--label);
}

/* the card is gone: no background, no border, no radius */
.vruler-wrap {
  display: flex;
  align-items: stretch;
  gap: 14px;
  height: clamp(220px, 36vh, 300px);
  background: transparent;
  border: 0;
  border-radius: 0;
}

.vruler-view {
  position: relative;
  flex: 0 0 96px;
  height: 100%;
  overflow: hidden;
  background-color: var(--surface);
}

.vruler {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  touch-action: pan-y;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  mask-image: linear-gradient(180deg,
    transparent 0, #000 18%, #000 82%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg,
    transparent 0, #000 18%, #000 82%, transparent 100%);
}
.vruler::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.vruler__track {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

/* step height: 24px in ft/in mode, 18px in cm mode */
.vruler__tick {
  position: relative;
  flex: 0 0 auto;
  height: 18px;
  scroll-snap-align: center;
  box-sizing: border-box;
  cursor: pointer;
}

.vruler-field--ftin .vruler__tick {
  height: 24px;
}

.vruler__num {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: 34px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  color: var(--label);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  pointer-events: none;
}

.vruler__tick::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 42px;
  transform: translateY(-50%);
  width: 12px;
  height: 1px;
  background: var(--hud);
}

.vruler__tick--major::before {
  width: 22px;
  height: 2px;
  background: rgba(255, 255, 255, 0.5);
}

/* the active row, set by JS */
.vruler__tick--on .vruler__num {
  color: var(--white);
  font-weight: 500;
}

/* soft band behind the active row, fades out rightward */
.vruler__band {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  height: 26px;
  background: linear-gradient(90deg,
    rgba(225, 29, 46, 0.16) 0%,
    rgba(225, 29, 46, 0.06) 55%,
    transparent 100%);
  pointer-events: none;
  z-index: 1;
}

/* the one bold mark — same left origin and width as a major tick */
.vruler__mark {
  position: absolute;
  top: 50%;
  left: 42px;
  transform: translateY(-50%);
  width: 30px;
  height: 3px;
  background: var(--red);
  pointer-events: none;
  z-index: 2;
}

/* the rail: no border, no boxes */
.vruler-rail {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  padding: 0;
  box-sizing: border-box;
}

.vruler-arrow {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  padding: 0;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  box-sizing: border-box;
}

.vruler-arrow:active {
  color: var(--white);
  background: none;
}

.vruler-arrow:focus-visible {
  outline: 1px solid var(--hud);
  outline-offset: 2px;
}

.vruler__value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 9.5vw, 40px);
  line-height: 1;
  color: var(--white);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-align: center;
}

.vruler__value i {
  display: block;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-style: normal;
  font-weight: 400;
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--label);
}

@media (prefers-reduced-motion: reduce) {
  .vruler {
    scroll-behavior: auto;
  }
}

/* ==================================================
   7. RESULTS INSTRUMENT PANEL (TIER 1 FRAMED)
   ================================================== */
.results-dashboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background-color: var(--surface);
  border: 1px solid var(--border);
  margin-top: 24px;
  margin-bottom: 24px;
}

.score-col {
  padding: 28px 22px;
  border-right: 1px solid var(--border);
}

.score-col:last-child {
  border-right: none;
}

.score-number {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 40px;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
}

/* ==================================================
   8. PRODUCT SHOWCASE (TIER 2 PLATE)
   ================================================== */
.showcase-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.product-mockup-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
}

.product-mockup-stage {
  position: relative;
  width: 100%;
  max-width: 400px;
  padding: 32px 24px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.mockup-glow {
  position: absolute;
  inset: 10%;
  background: radial-gradient(circle, rgba(225, 29, 46, 0.18) 0%, transparent 70%);
  filter: blur(40px);
  -webkit-filter: blur(40px);
  pointer-events: none;
}

.product-mockup-img {
  display: block;
  width: 100%;
  max-height: 480px;
  height: auto;
  object-fit: contain;
  position: relative;
  z-index: 1;
}

/* ==================================================
   9. COMPARISON COLUMNS (TIER 2 PLATES)
   ================================================== */
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 32px;
}

.comp-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.comp-item {
  display: flex;
  align-items: flex-start;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* ==================================================
   10. DISCOUNT OFFER BLOCK (TIER 1 FRAMED)
   ================================================== */
.discount-card {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 36px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.discount-price-block {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 24px;
}

.price-original {
  font-size: 1.25rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.price-current {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 8vw, 3rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1;
}

.discount-timer-box,
.discount-timer-wrapper {
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.timer-units,
.discount-timer-grid {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 8px;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: 100%;
}

.timer-unit {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 10px 14px;
  text-align: center;
  min-width: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;
}

.timer-val {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
}

.timer-colon {
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  user-select: none;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .timer-units,
  .discount-timer-grid {
    gap: 6px;
  }
  .timer-unit {
    padding: 8px 10px;
    min-width: 52px;
  }
  .timer-val {
    font-size: 1.2rem;
  }
  .timer-unit .mono-label {
    font-size: 9px !important;
  }
  .timer-colon {
    font-size: 1rem;
  }
}

@media (max-width: 360px) {
  .timer-units,
  .discount-timer-grid {
    gap: 4px;
  }
  .timer-unit {
    padding: 6px 8px;
    min-width: 46px;
  }
  .timer-val {
    font-size: 1.1rem;
  }
  .timer-unit .mono-label {
    font-size: 8px !important;
  }
  .timer-colon {
    font-size: 0.9rem;
  }
}

.discount-lang-wrapper {
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lang-selector {
  display: flex;
  gap: 10px;
}

.lang-btn {
  padding: 8px 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast), background var(--transition-fast);
}

.lang-btn:hover {
  border-color: var(--hud);
  color: var(--white);
}

.lang-btn.active {
  border-color: var(--red);
  background: var(--red-soft);
  color: var(--white);
}

.lang-btn[data-script="deva"] {
  font-family: var(--font-deva);
  font-size: 13px;
}

.discount-cta-wrapper {
  width: 100%;
  max-width: 480px;
  margin-bottom: 20px;
}

.discount-cta-btn {
  width: 100%;
}

.discount-benefits {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
  width: 100%;
  max-width: 480px;
  text-align: left;
}

/* ==================================================
   11. FAQ ACCORDION
   ================================================== */
.faq-list {
  max-width: 800px;
  margin: 32px auto 0 auto;
  display: flex;
  flex-direction: column;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  width: 100%;
  padding: 20px 0;
  background: transparent;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.faq-toggle-icon {
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--text-muted);
  transition: transform 0.2s, color 0.2s;
}

.faq-item.active .faq-toggle-icon {
  transform: rotate(45deg);
  color: var(--red);
}

.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  visibility: hidden;
}

.faq-item.active .faq-answer {
  grid-template-rows: 1fr;
  visibility: visible;
}

.faq-answer-inner {
  min-height: 0;
  overflow: hidden;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.faq-answer-inner::after {
  content: '';
  display: block;
  height: 20px;
}

.faq-answer-inner p {
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

.faq-answer-inner p:not(:last-child) {
  margin-bottom: 12px;
}

.faq-answer-inner strong,
.faq-answer-inner b {
  color: var(--white);
  font-weight: 600;
}

.faq-answer a {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition-fast);
}

.faq-answer a:hover,
.faq-answer a:focus-visible {
  color: var(--red-hover);
}

@media (prefers-reduced-motion: reduce) {
  .faq-answer {
    transition: none;
  }
}

/* ==================================================
   12. FINAL CTA CARD (TIER 1 FRAMED)
   ================================================== */
.final-cta-card {
  max-width: 840px;
  margin: 0 auto;
}

/* ==================================================
   13. LANGUAGE SELECTION MODAL (TIER 1 FRAMED — PROTOCOL SELECT)
   ================================================== */
body.modal-open {
  overflow: hidden !important;
}

.lang-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s;
}

.lang-modal-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.lang-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
}

.lang-modal-dialog {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 36px 28px 24px 28px;
  z-index: 2;
  text-align: center;
  transform: scale(0.96) translateY(8px);
  opacity: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s;
}

.lang-modal-overlay.active .lang-modal-dialog {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.lang-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

.lang-modal-close:hover {
  border-color: var(--hud);
  color: var(--white);
}

.lang-modal-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.lang-modal-subtitle {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

.lang-modal-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.lang-option-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 20px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--white);
  cursor: pointer;
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
  text-align: left;
}

.lang-option-btn:hover {
  border-color: var(--red);
  background-color: var(--red-soft);
}

.lang-option-content {
  display: flex;
  flex-direction: column;
}

.lang-arrow-mono {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-muted);
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.lang-option-btn:hover .lang-arrow-mono {
  transform: translateX(4px);
  color: var(--red);
}

.lang-modal-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

/* ==================================================
   14. FOOTER
   ================================================== */
.footer {
  padding: 72px 24px 36px 24px;
  background: var(--bg);
  border-top: 1px solid var(--border);
}



/* ==================================================
   15. RESPONSIVE BREAKPOINTS
   ================================================== */
@media (max-width: 992px) {
  .hero-wrapper {
    padding-top: clamp(220px, 72vw, 320px);
    padding-bottom: 48px;
  }
  .timeline-container {
    grid-template-columns: 1fr;
  }
  .showcase-wrapper {
    grid-template-columns: 1fr;
  }
  .results-dashboard {
    grid-template-columns: 1fr;
  }
  .score-col {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .score-col:last-child {
    border-bottom: none;
  }
  .comparison-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .radio-group {
    grid-template-columns: 1fr;
  }
  .assessment-panel {
    padding: 24px 16px;
  }
  .discount-card {
    padding: 32px 18px;
  }
  .hero-text-col {
    padding: 24px 18px;
  }
}

/* ==========================================================================
   15. EBOOK SAMPLE PAGE READER MODULE (PHASE B)
   ========================================================================== */
.sample-reader-container {
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .sample-reader-container {
    max-width: 420px;
  }
}

.sample-reader-surface {
  background: var(--surface);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  outline: none;
}

.sample-reader-surface:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.sample-reader-meta {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.sample-reader-counter {
  font-size: 0.85rem;
  color: var(--white);
}

.sample-reader-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1.4142;
  perspective: 1600px;
  -webkit-perspective: 1600px;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
  border-radius: 2px;
  background: #111114;
}

.reader-tap-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 25;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.reader-tap-prev {
  left: 0;
  width: 30%;
}

.reader-tap-next {
  right: 0;
  width: 30%;
}

.sample-pages-stack {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
}

.sample-page-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform-origin: left center;
  -webkit-transform-origin: left center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition: transform 620ms cubic-bezier(0.16, 1, 0.3, 1), opacity 200ms ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
  border-radius: 2px;
  overflow: hidden;
  background: #F4F2ED;
}

.sample-page-item.flipped {
  transform: rotateY(-168deg);
  pointer-events: none;
}

.sample-page-item .page-shadow-sweep {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.25) 35%, rgba(0, 0, 0, 0) 100%);
  transition: opacity 620ms cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 5;
}

.sample-page-item.turning .page-shadow-sweep {
  opacity: 1;
}

.reader-page__img,
.sample-page-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.reader-page__missing {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1.4142;
  width: 100%;
  padding: 24px;
  text-align: center;
  background: rgba(225, 29, 46, 0.10);
  border: 2px dashed #E11D2E;
  color: #E11D2E;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
  word-break: break-all;
}

@media (prefers-reduced-motion: reduce) {
  .sample-page-item {
    transform: none !important;
    transition: opacity 200ms ease !important;
  }
  .sample-page-item.flipped {
    opacity: 0 !important;
    display: none !important;
  }
}

.sample-reader-controls {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.btn-reader-arrow {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--white);
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
  font-size: 1.25rem;
  font-family: var(--font-mono);
  line-height: 1;
}

.btn-reader-arrow:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  border-color: var(--border-subtle);
}

.btn-reader-arrow:not(:disabled):hover {
  border-color: var(--red);
  color: var(--red);
  background: var(--surface-3);
}

/* Paywall Panel (Page 06) */
.reader-paywall {
  position: relative; width: 100%; aspect-ratio: 1 / 1.4142;
  overflow: hidden; border-radius: 4px; isolation: isolate;
}
.reader-paywall__bg {
  position: absolute; inset: -8%; width: 116%; height: 116%;
  object-fit: cover;
  filter: blur(18px) saturate(0.7) brightness(0.55);
  pointer-events: none; user-select: none;
}
.reader-paywall__body {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 18px;
  width: 100%; height: 100%; padding: 28px 22px;
  text-align: center;
  background: linear-gradient(180deg,
    rgba(8,8,10,0.72) 0%, rgba(8,8,10,0.88) 55%, rgba(8,8,10,0.94) 100%);
}
.reader-paywall__label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .18em;
  color: var(--red); margin: 0;
}
.reader-paywall__heading {
  font-family: var(--font-display); font-weight: 700; font-size: 22px;
  line-height: 1.2; color: var(--white); margin: 0; max-width: 15ch;
}
.reader-paywall__list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 9px;
  width: 100%; max-width: 260px;
}
.reader-paywall__list li {
  position: relative;
  padding-left: 16px;
  font-family: var(--font-display); font-weight: 600; font-size: 13px;
  line-height: 1.3; color: var(--white); text-align: left;
}
.reader-paywall__list li::before {
  content: '';
  position: absolute; left: 0; top: 0.5em;
  width: 6px; height: 6px;
  background: var(--red);
}
.reader-paywall__cta {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  background: var(--red); color: var(--white); border: 0; border-radius: 4px;
  font-family: var(--font-display); font-weight: 700; font-size: 14px;
  letter-spacing: .04em; cursor: pointer;
}
.reader-paywall__cta:hover  { background: var(--red-hover); }
.reader-paywall__cta:active { transform: translateY(1px); }

@media (prefers-reduced-motion: reduce) {
  .reader-paywall__cta:active { transform: none; }
}

.sample-progress-rail {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 12px;
}

.sample-progress-rail .progress-tick {
  flex: 1;
  height: 3px;
  background: var(--border);
  border-radius: 1px;
  transition: flex 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease, box-shadow 0.2s ease;
}

.sample-progress-rail .progress-tick.active {
  flex: 2.5;
  background: var(--red);
  box-shadow: 0 0 6px rgba(225, 29, 46, 0.5);
}

.sample-end-label {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

/* ==========================================================================
   16. LOCKED ROUTINE PREVIEW IN RESULTS (PHASE C)
   ========================================================================== */
.routine-locked-group {
  position: relative;
  margin-top: 0;
}

.routine-row-locked {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  border-left: 2px solid var(--red);
  padding-left: 14px;
  position: relative;
}

.routine-row-locked .routine-text-placeholder {
  filter: blur(5px);
  -webkit-filter: blur(5px);
  opacity: 0.65;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.routine-text-placeholder .placeholder-line {
  height: 10px;
  background: var(--text-muted);
  border-radius: 3px;
}

.routine-lock-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(16, 16, 19, 0.95) 0%, rgba(16, 16, 19, 0.75) 55%, rgba(16, 16, 19, 0.25) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 24px 16px;
  text-align: center;
  z-index: 10;
}

.routine-lock-overlay .routine-lock-icon {
  color: var(--red);
  margin-bottom: 8px;
}

.routine-lock-overlay .routine-lock-msg {
  font-size: 0.92rem;
  color: var(--white);
  font-weight: 600;
  margin-bottom: 16px;
  font-family: var(--font-display);
}

@media (max-width: 576px) {
  .sample-reader-surface {
    padding: 20px 14px;
  }
}

/* ==================================================
   FIXED 5-TAB BOTTOM NAVIGATION (.botnav)
   ================================================== */
.botnav {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 200;
  box-sizing: border-box;
  display: flex; align-items: flex-end; justify-content: space-around;
  gap: 4px;
  height: 62px;
  padding: 6px 8px;
  padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
  padding-left:  calc(8px + env(safe-area-inset-left, 0px));
  padding-right: calc(8px + env(safe-area-inset-right, 0px));
  border-top: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: linear-gradient(0deg,
    rgba(8, 8, 10, 0.96) 0%,
    rgba(8, 8, 10, 0.93) 58%,
    rgba(8, 8, 10, 0.60) 82%,
    rgba(8, 8, 10, 0.00) 100%);
  transition: transform .22s ease;
  will-change: transform;
}

.botnav[data-chrome-hidden] {
  transform: translateY(calc(100% + 26px));
}

@media (prefers-reduced-motion: reduce) {
  header, .navbar, .botnav { transition: none; }
}

.botnav__tab {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  gap: 3px;
  background: none; border: 0; padding: 4px 2px; cursor: pointer;
  color: var(--text-muted);
}
.botnav__tab[aria-current="true"] { color: var(--white); }

.botnav__icon { width: 22px; height: 22px; display: inline-flex; }
.botnav__icon svg { width: 100%; height: 100%; display: block; }
.botnav__icon--rupee {
  font-family: var(--font-display); font-weight: 700; font-size: 19px;
  line-height: 22px; align-items: center; justify-content: center;
}

.botnav__label {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .06em;
  line-height: 1; white-space: nowrap;
}

/* center action, raised */
.botnav__tab--center { position: relative; }
.botnav__fab {
  position: absolute; top: -22px; left: 50%; transform: translateX(-50%);
  width: 52px; height: 52px; border-radius: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--red); color: var(--white);
  border: 3px solid var(--bg);
  box-shadow: 0 6px 18px rgba(225, 29, 46, 0.45);
}
.botnav__fab svg { width: 26px; height: 26px; }
.botnav__label--center {
  color: var(--red); font-weight: 500; margin-top: 30px;
}
.botnav__tab--center[aria-current="true"] .botnav__label--center { color: var(--red-hover); }

/* keep the last section clear of the bar with 20px breathing space */
body { padding-bottom: calc(94px + env(safe-area-inset-bottom, 0px)); }
.site-root { padding-bottom: 0; }

/* Hide botnav during initial gate overlay */
body.gate-active .botnav,
.site-root.is-gated ~ .botnav {
  display: none !important;
}

/* ==================================================
   HELP FAQ ACCORDION BOTTOM SHEET & FOOTER TRIGGER
   ================================================== */
.help-sheet{ position:fixed; inset:0; z-index:300; }
.help-sheet[hidden]{ display:none; }
.help-sheet__scrim{ position:absolute; inset:0; background:rgba(0,0,0,.62);
  opacity:0; transition:opacity .24s ease; }
.help-sheet[data-open] .help-sheet__scrim{ opacity:1; }

.help-sheet__panel{
  position:absolute; left:0; right:0; bottom:0; box-sizing:border-box;
  max-height:88vh; overflow-y:auto; overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  background:var(--surface); border-top:1px solid var(--border);
  border-radius:16px 16px 0 0;
  padding:10px 16px calc(22px + env(safe-area-inset-bottom, 0px));
  transform:translateY(100%);
  transition:transform .26s cubic-bezier(.22,.61,.36,1);
}
.help-sheet[data-open] .help-sheet__panel{ transform:translateY(0); }

.help-sheet__grab{ display:block; width:40px; height:4px; margin:0 auto 12px;
  border-radius:999px; background:var(--border); }
.help-sheet__head{ display:flex; align-items:center; gap:8px; }
.help-sheet__title{ flex:1 1 auto; min-width:0; margin:0;
  font-family:var(--font-display); font-weight:700; font-size:17px;
  letter-spacing:.06em; color:var(--white); }
.help-x{ flex:0 0 44px; width:44px; height:44px; padding:0; background:none;
  border:0; color:var(--text-muted); font-family:var(--font-mono);
  font-size:22px; line-height:1; cursor:pointer; }

.help-lede{ margin:2px 0 14px; font-family:var(--font-body); font-size:13px;
  color:var(--label); }

.help-item{ border-bottom:1px solid var(--border); }
.help-item:last-child{ border-bottom:0; }

.help-q{ display:flex; align-items:center; gap:12px; width:100%;
  box-sizing:border-box; min-height:56px; padding:14px 2px;
  background:none; border:0; text-align:left; cursor:pointer;
  font-family:var(--font-body); font-weight:500; font-size:14px;
  line-height:1.4; color:var(--white); }
.help-q span{ flex:1 1 auto; min-width:0; }
.help-q i{ flex:0 0 20px; width:20px; text-align:center; font-style:normal;
  font-family:var(--font-mono); font-size:18px; color:var(--text-muted);
  transition:transform .2s ease; }
.help-q[aria-expanded="true"]{ color:var(--white); }
.help-q[aria-expanded="true"] i{ transform:rotate(45deg); color:var(--red); }

.help-a{ padding:0 2px 18px; }
.help-a[hidden]{ display:none; }

.help-p{ margin:0 0 14px; font-family:var(--font-body); font-size:13.5px;
  line-height:1.55; color:var(--text-muted); }

.help-steps{ margin:0 0 14px; padding:0; list-style:none; counter-reset:hstep; }
.help-steps li{ position:relative; counter-increment:hstep;
  padding:0 0 16px 36px; font-family:var(--font-body); font-size:13.5px;
  line-height:1.55; color:var(--text-muted); }
.help-steps li:last-child{ padding-bottom:0; }
.help-steps li::before{ content:'0' counter(hstep); position:absolute; left:0;
  top:1px; font-family:var(--font-mono); font-size:11px; color:var(--red); }
.help-steps li b{ display:block; margin-bottom:3px;
  font-family:var(--font-display); font-weight:600; font-size:14px;
  color:var(--white); }

.help-link{ display:inline-block; margin-top:8px; padding:0; background:none;
  border:0; font-family:var(--font-mono); font-size:11px; letter-spacing:.12em;
  color:var(--white); text-decoration:underline; text-underline-offset:3px;
  cursor:pointer; }
.help-link--btn{ text-decoration:none; margin-bottom:14px; }

.help-mail{ display:flex; flex-wrap:wrap; gap:8px; margin-top:6px; }
.help-btn{ flex:1 1 138px; min-width:0; min-height:46px; padding:0 12px;
  box-sizing:border-box; display:inline-flex; align-items:center;
  justify-content:center; background:var(--surface-2);
  border:1px solid var(--border); border-radius:10px; color:var(--white);
  font-family:var(--font-mono); font-size:11px; letter-spacing:.12em;
  text-align:center; text-decoration:none; cursor:pointer; }
.help-btn--primary{ background:var(--red); border-color:var(--red); }
.help-addr{ flex:1 1 100%; font-family:var(--font-mono); font-size:12px;
  color:var(--text-muted); word-break:break-all; }
.help-note{ flex:1 1 100%; margin:6px 0 0; font-family:var(--font-body);
  font-size:12px; line-height:1.5; color:var(--label); }

@media (prefers-reduced-motion: reduce){
  .help-sheet__scrim,.help-sheet__panel,.help-q i{ transition:none; }
}

.help-foot{ padding:26px 16px calc(30px + env(safe-area-inset-bottom, 0px));
  text-align:center; }
.help-foot__link{ min-height:44px; padding:0 16px; background:none; border:0;
  font-family:var(--font-mono); font-size:11px; letter-spacing:.14em;
  color:var(--text-muted); text-decoration:underline;
  text-underline-offset:4px; cursor:pointer; }
.help-item[hidden]{ display:none; }

/* --- PAGE-WIDE FIXED CHARACTER SILHOUETTE (LAYER 1) --- */
.page-char{
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100vh;
  z-index:1;
  pointer-events:none;
  background-image:url('../images/hero-alpha.webp');
  background-repeat:no-repeat;
  background-position:50% 100%;
  background-size:auto min(86%, 760px);
  opacity:.15;
  filter:grayscale(1) brightness(.46) blur(4px);
  mask-image:
    linear-gradient(180deg, transparent 0%, #000 16%, #000 74%, transparent 100%),
    linear-gradient(90deg,  transparent 0%, #000 14%, #000 86%, transparent 100%);
  -webkit-mask-image:
    linear-gradient(180deg, transparent 0%, #000 16%, #000 74%, transparent 100%),
    linear-gradient(90deg,  transparent 0%, #000 14%, #000 86%, transparent 100%);
  mask-composite:intersect;
  -webkit-mask-composite:source-in;
}

/* --- PER-SECTION AMBIENT RED GLOW --- */
.sect-mark{
  position:relative;
  isolation:isolate;
}
.sect-mark::after{
  content:'';
  position:absolute;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background:radial-gradient(130% 62% at var(--glow-x, 50%) var(--glow-y, 26%),
    rgba(225,29,46,0.052) 0%,
    rgba(225,29,46,0.017) 44%,
    transparent 76%);
}

/* Per-Section Distinct Glow Coordinates */
#why-section        { --glow-x:82%; --glow-y:20%; }
#how-section        { --glow-x:22%; --glow-y:28%; }
#assessment-section { --glow-x:18%; --glow-y:14%; }
#results-section    { --glow-x:50%; --glow-y:20%; }
#blueprint-section  { --glow-x:78%; --glow-y:22%; }
#difference-section { --glow-x:28%; --glow-y:36%; }
#audience-section   { --glow-x:72%; --glow-y:30%; }
#discount-section   { position:relative; isolation:isolate; --glow-x:50%; --glow-y:42%; }
#discount-section::after{
  content:'';
  position:absolute;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background:radial-gradient(120% 70% at var(--glow-x, 50%) var(--glow-y, 42%),
    rgba(225,29,46,0.085) 0%,
    rgba(225,29,46,0.030) 42%,
    transparent 74%);
}
#stories-section    { --glow-x:24%; --glow-y:64%; }
#faq-section        { --glow-x:80%; --glow-y:30%; }
.final-cta-section  { --glow-x:64%; --glow-y:34%; }

/* --- PAGE VIGNETTE (LAYER 5) --- */
.site-root::after{
  content:'';
  position:fixed;
  inset:0;
  z-index:2;
  pointer-events:none;
  background:radial-gradient(120% 92% at 50% 44%,
    transparent 54%,
    rgba(0,0,0,0.40) 100%);
}

/* ===== BOOK LIBRARY CAROUSEL ===== */
.library-viewport {
  overflow: hidden;
  padding: 6px 0 8px;
}
.library-rail {
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.42s cubic-bezier(0.16, 1, 0.3, 1);
}

.library-card {
  flex: 0 0 calc(30% - 6px);
  min-width: 0;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  opacity: 0.45;
  transition: flex-basis 0.42s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.42s ease,
              transform 0.42s cubic-bezier(0.16, 1, 0.3, 1);
}
.library-card.is-active {
  flex: 0 0 calc(52% - 6px);
  opacity: 1;
  transform: perspective(1100px) rotateY(0deg) translateZ(30px);
  z-index: 3;
}
.library-card.is-left {
  transform: perspective(1100px) rotateY(30deg) translateZ(-70px);
}
.library-card.is-right {
  transform: perspective(1100px) rotateY(-30deg) translateZ(-70px);
}
.library-card.is-active .library-card__cover {
  box-shadow: 0 26px 54px rgba(0, 0, 0, 0.78);
}

.library-card__cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
}
.library-card__cover::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 9px;
  z-index: 2;
  background: linear-gradient(90deg,
    rgba(0,0,0,0.80) 0%,
    rgba(255,255,255,0.12) 58%,
    rgba(0,0,0,0.50) 100%);
}
.library-card__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.library-card__meta {
  display: block;
  padding-top: 12px;
  min-height: 74px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.library-card.is-active .library-card__meta {
  opacity: 1;
  pointer-events: auto;
  text-align: center;
}
.library-card__no {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: var(--label);
}
.library-card__title {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.25;
  color: var(--white);
  margin-top: 4px;
}
.library-card__hint {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  color: var(--red);
  margin-top: 8px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.library-card.is-active .library-card__hint { opacity: 1; }

.library-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 4px;
}
.library-dot {
  width: 6px; height: 6px;
  background: var(--hud);
  transition: background 0.3s ease, width 0.3s ease;
}
.library-dot.is-active { width: 18px; background: var(--red); }

.library-note {
  max-width: 460px;
  margin: 22px auto 0;
  text-align: center;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text-muted);
}
.library-cta-wrap {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

/* ===== 3D INTERACTIVE PHYSICAL BOOK OPENING EXPERIENCE ===== */
body.lib-sheet-open {
  position: fixed;
  left: 0; right: 0;
  width: 100%;
}
.lib-sheet {
  position: fixed;
  inset: 0;
  z-index: 9200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: hidden;
}
.lib-sheet[hidden] { display: none; }
.lib-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(16, 16, 22, 0.88) 0%, rgba(5, 5, 8, 0.96) 100%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  opacity: 0;
  transition: opacity 0.45s ease;
}
.lib-sheet[data-open] .lib-sheet__backdrop { opacity: 1; }

.lib-sheet__close {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-muted);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  z-index: 9250;
  border-radius: 50%;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.lib-sheet__close:hover {
  background: rgba(255, 255, 255, 0.18);
  color: var(--white);
  transform: scale(1.08) rotate(90deg);
  border-color: rgba(255, 255, 255, 0.28);
}

.book-modal__stage {
  position: relative;
  z-index: 9210;
  perspective: 1800px;
  perspective-origin: center center;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 440px;
  padding: 10px 0;
}

.book-3d {
  position: relative;
  width: 100%;
  max-width: 420px;
  height: min(80vh, 620px);
  transform-style: preserve-3d;
  transform: scale(0.92) rotateY(0deg);
  opacity: 0;
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.4s ease;
}

.lib-sheet[data-open] .book-3d {
  opacity: 1;
  transform: scale(1) rotateY(-3deg);
}

/* Interior Book Body & Single Right Page */
.book-3d__body {
  position: relative;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #15151a 0%, #0c0c10 100%);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-left: 3px solid rgba(255, 255, 255, 0.24);
  box-shadow: -15px 25px 50px rgba(0, 0, 0, 0.85),
              0 0 0 1px rgba(255, 255, 255, 0.05),
              inset 20px 0 35px -10px rgba(0, 0, 0, 0.9),
              inset -5px 0 15px rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 2px 6px 6px 2px;
}

/* Page Stack & Spine Edge Effect */
.book-3d__body::after {
  content: '';
  position: absolute;
  top: 4px;
  bottom: 4px;
  right: -5px;
  width: 5px;
  background: repeating-linear-gradient(
    to bottom,
    #2a2a32 0px,
    #18181f 2px,
    #2a2a32 4px
  );
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.6);
  border-radius: 0 2px 2px 0;
}

/* Left spine seam gutter shadow */
.book-3d__spine-shadow {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 30px;
  z-index: 10;
  pointer-events: none;
  background: linear-gradient(to right,
    rgba(0, 0, 0, 0.8) 0%,
    rgba(0, 0, 0, 0.35) 45%,
    transparent 100%
  );
}

.book-3d__interior {
  position: relative;
  z-index: 5;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 24px 22px 20px 28px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}
.book-3d__interior::-webkit-scrollbar {
  width: 4px;
}
.book-3d__interior::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}

/* 3D Front Cover (Flap that opens from spine) */
.book-3d__cover {
  position: absolute;
  inset: 0;
  z-index: 20;
  transform-origin: left center;
  transform-style: preserve-3d;
  transform: rotateY(0deg);
  transition: transform 0.72s cubic-bezier(0.2, 0.9, 0.3, 1),
              box-shadow 0.72s cubic-bezier(0.2, 0.9, 0.3, 1);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.75);
  border-radius: 2px 6px 6px 2px;
  pointer-events: none;
}

.lib-sheet[data-open] .book-3d__cover {
  transform: rotateY(-165deg);
  box-shadow: 18px 25px 45px rgba(0, 0, 0, 0.65);
}

/* Front side of cover */
.book-3d__cover-front {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 2px 6px 6px 2px;
}

.book-3d__cover-front::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 14px;
  z-index: 2;
  background: linear-gradient(90deg,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(255, 255, 255, 0.18) 55%,
    rgba(0, 0, 0, 0.5) 100%
  );
}

.book-3d__cover-front::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.08) 0%,
    transparent 50%,
    rgba(0, 0, 0, 0.35) 100%
  );
}

.book-3d__cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Inside of front cover (when opened and flipped 180deg) */
.book-3d__cover-back {
  position: absolute;
  inset: 0;
  transform: rotateY(180deg);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background: linear-gradient(to left, #16161c 0%, #0d0d10 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px 2px 2px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
}

.book-3d__cover-back::after {
  content: '';
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 24px;
  background: linear-gradient(to left,
    rgba(0, 0, 0, 0.75) 0%,
    transparent 100%
  );
}

.book-3d__back-emblem {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  color: var(--label);
  opacity: 0.45;
  text-align: center;
  line-height: 1.6;
}

/* Typography & Content Elements inside Book Page */
.book-3d__interior .lib-sheet__no {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  color: var(--red);
  margin-bottom: 2px;
}

.book-3d__interior .lib-sheet__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.22;
  color: var(--white);
  margin: 4px 0 2px 0;
}

.book-3d__interior .lib-sheet__tag {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  color: var(--label);
  margin: 0 0 12px 0;
}

.book-3d__interior .lib-sheet__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
  flex: 1 0 auto;
}

.book-3d__interior .lib-point {
  display: block;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.book-3d__interior .lib-point__h {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.84rem;
  color: var(--white);
  margin-bottom: 2px;
}

.book-3d__interior .lib-point__d {
  display: block;
  font-size: 0.77rem;
  line-height: 1.42;
  color: var(--text-muted);
}

.book-3d__interior .lib-sheet__foot {
  margin-top: 16px;
  padding-top: 4px;
}

.book-3d__interior .lib-sheet__foot .btn {
  width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  .library-rail,
  .library-card,
  .library-card__hint,
  .library-dot,
  .lib-sheet__backdrop,
  .book-3d,
  .book-3d__cover { transition: none !important; }
  .lib-sheet[data-open] .book-3d__cover { transform: rotateY(-180deg) !important; }
}

@media (max-width: 480px) {
  .book-modal__stage {
    max-width: 100%;
    padding: 0;
  }
  .book-3d {
    max-width: min(92vw, 370px);
    height: min(82vh, 580px);
  }
  .book-3d__interior {
    padding: 20px 16px 18px 20px;
  }
  .lib-sheet[data-open] .book-3d__cover {
    transform: rotateY(-155deg);
  }
}

@media (min-width: 720px) {
  .library-viewport { padding-left: 0; padding-right: 0; }
  .library-rail { gap: 14px; }
  .library-card { flex: 0 0 calc(22% - 11px); }
  .library-card.is-active { flex: 0 0 calc(42% - 11px); }
}




