/* CineAHO Child Height Prediction Calculator Stylesheet */

:root {
  /* Colors */
  --brand-cyan: #06b6d4;
  --brand-cyan-dark: #0891b2;
  --brand-blue: #3b82f6;
  --brand-blue-dark: #1d4ed8;
  --brand-pink: #ec4899;
  --brand-pink-dark: #be185d;
  --brand-green: #10b981;
  --brand-green-dark: #047857;
  --brand-yellow: #fbbf24;
  --brand-orange: #f97316;
  --brand-red: #ef4444;

  --bg-dark: #060913;
  --panel-bg: rgba(14, 20, 38, 0.55);
  --border-light: rgba(255, 255, 255, 0.05);
  --text-light: #f1f5f9;
  --text-muted: #94a3b8;
  
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-premium: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
}

/* Base resets */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans KR', 'Inter', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-light);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Grid Background */
body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: -2;
  pointer-events: none;
}

/* Background Lighting */
.bg-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(160px);
  opacity: 0.25;
  pointer-events: none;
  z-index: -3;
}
.bg-glow-purple {
  background: radial-gradient(circle, #7e22ce 0%, transparent 70%);
  top: -200px;
  left: 10%;
}
.bg-glow-blue {
  background: radial-gradient(circle, #2563eb 0%, transparent 70%);
  top: 20%;
  right: 5%;
}

/* Glass panel helper */
.glass-panel {
  background: var(--panel-bg);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-premium);
  transition: var(--transition-smooth);
}
.glass-panel:hover {
  border-color: rgba(0, 242, 254, 0.15);
  box-shadow: var(--shadow-premium), 0 0 25px rgba(0, 242, 254, 0.05);
}

/* ==========================================
     PORTAL HEADER & FOOTER (Matches main portal layout)
     ========================================== */
.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 2rem;
  z-index: 100;
  margin: 1rem 1.5rem 0 1.5rem;
  border-radius: 50px;
  position: sticky;
  top: 1rem;
}

.glass-header {
  background: rgba(14, 20, 38, 0.75);
  border: 1px solid var(--border-light);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.logo-circle {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--brand-blue) 0%, #1d4ed8 100%);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-text {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.logo-text span {
  color: var(--text-muted);
  font-weight: 400;
}

.header-nav {
  flex-grow: 1;
  margin: 0 2rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.header-nav::-webkit-scrollbar {
  display: none;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 1.25rem;
  white-space: nowrap;
}

.nav-list a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition-smooth);
  padding: 0.5rem 0.25rem;
  position: relative;
}

.nav-list a:hover {
  color: var(--text-light);
}

.nav-list a.active {
  color: var(--text-muted);
}

.nav-list a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--brand-blue);
  border-radius: 2px;
}

.btn-back-dashboard {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 30px;
  padding: 0.5rem 1.2rem;
  color: var(--text-light);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.btn-back-dashboard:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--brand-blue);
  transform: translateX(-2px);
}

.main-footer {
  text-align: center;
  padding: 4rem 2rem;
  border-top: 1px solid var(--border-light);
  margin-top: 5rem;
  background: rgba(14, 20, 38, 0.4);
}
.main-footer p {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.footer-note {
  margin-top: 0.5rem;
  font-size: 0.78rem !important;
}

/* ==========================================
     MAIN CALCULATOR WORKSPACE
     ========================================== */
.calculator-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 2rem 1.5rem 6rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Back Link */
.sub-nav-back {
  display: flex;
}
.back-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
}
.back-link:hover {
  color: var(--brand-cyan);
  transform: translateX(-3px);
}

/* Header Banner Card */
.app-banner {
  padding: 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(14, 20, 38, 0.85) 0%, rgba(30, 41, 59, 0.4) 100%);
}
.app-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 4px; height: 100%;
  background: linear-gradient(to bottom, var(--brand-cyan), var(--brand-blue));
}

.badge-capsule {
  display: inline-block;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.2);
  color: var(--brand-cyan);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.85rem;
  border-radius: 50px;
  margin-bottom: 0.8rem;
  letter-spacing: 0.5px;
}

.app-banner h2 {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}
.app-banner p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}
.banner-decor {
  font-size: 4rem;
  color: rgba(255, 255, 255, 0.03);
}

/* Gender Selector Card */
.gender-selector-section {
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  background: rgba(14, 20, 38, 0.45);
}
.section-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  font-weight: 700;
}
.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--brand-yellow);
  border-radius: 50%;
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(251, 191, 36, 0); }
  100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0); }
}

.gender-buttons {
  display: flex;
  gap: 1rem;
  flex-grow: 1;
  max-width: 500px;
}
.gender-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  padding: 0.85rem 1.5rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.gender-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-light);
  border-color: rgba(255, 255, 255, 0.12);
}
.gender-btn i {
  font-size: 1.2rem;
}
/* Active States */
.gender-btn[data-gender="boy"].active {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
  color: #fff;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.25);
}
.gender-btn[data-gender="girl"].active {
  background: var(--brand-pink);
  border-color: var(--brand-pink);
  color: #fff;
  box-shadow: 0 8px 24px rgba(236, 72, 153, 0.25);
}

/* ==========================================
     INPUTS & RESULTS GRID
     ========================================== */
.calculator-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 2rem;
}
.grid-col-input,
.grid-col-results {
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 1.2rem;
  margin-bottom: 2rem;
}
.panel-header.no-border {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 1.2rem;
}
.panel-header .title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff;
}
.panel-header .title-sub {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-reset,
.btn-copy {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.btn-reset:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  transform: rotate(180deg);
}
.btn-copy:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

/* Sliders styling */
.slider-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 2rem;
}
.slider-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.slider-label-row .label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
}
.slider-label-row .label i {
  margin-right: 0.35rem;
}
.slider-label-row .value-display {
  font-size: 1.4rem;
  color: var(--brand-blue);
  transition: var(--transition-smooth);
}
/* Dynamic change value colors based on active slider */
#slider-mother-height + .range-bounds + .quick-buttons-row ~ .slider-label-row .value-display,
.slider-group:nth-child(3) .value-display {
  color: var(--brand-pink);
}

.slider-label-row strong {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
}
.slider-label-row .unit {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 0.1rem;
}

/* Range Slider input custom styling */
.range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  outline: none;
  margin: 1rem 0 0.5rem 0;
  transition: background 0.3s;
}
.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.15s, background-color 0.15s;
}
/* Dad's slider thumb color */
#slider-father-height::-webkit-slider-thumb {
  background: var(--brand-blue);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.6);
}
/* Mom's slider thumb color */
#slider-mother-height::-webkit-slider-thumb {
  background: var(--brand-pink);
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.6);
}
.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: #fff;
}
.range-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.15s, background-color 0.15s;
}
#slider-father-height::-moz-range-thumb {
  background: var(--brand-blue);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.6);
}
#slider-mother-height::-moz-range-thumb {
  background: var(--brand-pink);
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.6);
}
.range-slider::-moz-range-thumb:hover {
  transform: scale(1.2);
  background: #fff;
}

.range-bounds {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

/* Quick Select buttons */
.quick-buttons-row {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.quick-buttons-row .qs-btn {
  flex: 1;
  min-width: 42px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  transition: var(--transition-smooth);
}
.quick-buttons-row .qs-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}
/* Dad active button */
#quick-father-height-buttons .qs-btn.active {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
  color: #fff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}
/* Mom active button */
#quick-mother-height-buttons .qs-btn.active {
  background: var(--brand-pink);
  border-color: var(--brand-pink);
  color: #fff;
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

.input-card-divider {
  height: 1px;
  border-top: 1px dashed var(--border-light);
  margin: 1.5rem 0 2rem 0;
}

/* Child Optional inputs */
.child-info-header {
  margin-bottom: 1.25rem;
}
.child-info-header .title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
}
.child-inputs-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.input-sub-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.input-sub-group label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}
.form-select,
.form-input {
  background-color: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  color: #fff;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition-smooth);
}
.form-select:focus,
.form-input:focus {
  border-color: var(--brand-green);
  background-color: rgba(0, 0, 0, 0.35);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
}
/* Number input container wrapper */
.number-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.number-input-wrapper .form-input {
  width: 100%;
  padding-right: 3rem;
}
.number-input-wrapper .input-unit {
  position: absolute;
  right: 1.2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  pointer-events: none;
}
/* Disable number arrows */
.form-input::-webkit-outer-spin-button,
.form-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ==========================================
     RESULTS PANEL STYLING
     ========================================== */
.target-output-display {
  text-align: center;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.avatar-decor {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  transition: var(--transition-smooth);
}
/* Boy/Girl active avatar style */
.target-output-display.boy .avatar-decor {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.2);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.1);
}
.target-output-display.girl .avatar-decor {
  background: rgba(236, 72, 153, 0.1);
  border-color: rgba(236, 72, 153, 0.2);
  box-shadow: 0 0 20px rgba(236, 72, 153, 0.1);
}

.target-output-display .label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.target-output-display h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 4rem;
  font-weight: 800;
  line-height: 1.1;
  margin: 0.35rem 0;
  color: #fff;
  transition: var(--transition-smooth);
}
/* Boy/Girl text gradients */
.target-output-display.boy h1 {
  background: linear-gradient(135deg, #ffffff 40%, var(--brand-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.target-output-display.girl h1 {
  background: linear-gradient(135deg, #ffffff 40%, var(--brand-pink) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.target-output-display .unit {
  font-size: 1.8rem;
  font-weight: 600;
  margin-left: 0.15rem;
  vertical-align: baseline;
}
.range-display {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.range-display span {
  font-weight: 700;
  color: #fff;
}

/* Average badge */
.average-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  padding: 0.45rem 1rem;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-top: 1.25rem;
}

/* Summary Row card info */
.results-summary-row {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  display: flex;
  padding: 1rem 0;
  margin-bottom: 2rem;
}
.summary-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.summary-item .lbl {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}
.summary-item .val {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-top: 0.2rem;
}
.summary-divider {
  width: 1px;
  background-color: var(--border-light);
}

/* Growth Projection (Child inputs filled) */
.growth-projection-panel {
  animation: fadeIn 0.4s ease-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.projection-sub-card {
  background: rgba(6, 182, 212, 0.03);
  border: 1px solid rgba(6, 182, 212, 0.1);
  border-radius: 18px;
  padding: 1.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}
.card-title-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.25rem;
}
.proj-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.proj-stat-box {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
}
.proj-stat-box .lbl {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}
.proj-stat-box h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0.25rem 0;
  color: #fff;
}
.proj-stat-box p {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.proj-advice-box {
  background: rgba(255, 255, 255, 0.02);
  border-left: 3px solid var(--brand-green);
  padding: 0.75rem 1rem;
  border-radius: 0 10px 10px 0;
}
.proj-advice-box p {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-light);
}

/* ==========================================
     DYNAMIC SVG GROWTH CHART SECTION
     ========================================== */
.growth-chart-section {
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
}
.growth-chart-section h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.chart-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.8rem;
}
.chart-wrapper {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 1.25rem;
  overflow: hidden;
  position: relative;
}
#svg-growth-chart {
  display: block;
  width: 100%;
  height: 320px;
}

/* Chart axis and grid labels in SVG */
.chart-axis-label {
  fill: var(--text-muted);
  font-size: 9px;
  font-family: 'Inter', sans-serif;
}
.chart-grid-line {
  stroke: rgba(255, 255, 255, 0.03);
  stroke-width: 1;
}
.chart-axis-line {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 1;
}

/* Line colors matching legend */
.chart-line-p95 {
  stroke: rgba(249, 115, 22, 0.6);
  stroke-width: 1.5;
  stroke-dasharray: 4,4;
  fill: none;
}
.chart-line-p50 {
  stroke: rgba(6, 182, 212, 0.8);
  stroke-width: 2;
  fill: none;
}
.chart-line-p5 {
  stroke: rgba(239, 68, 68, 0.6);
  stroke-width: 1.5;
  stroke-dasharray: 4,4;
  fill: none;
}
.chart-area-fill {
  fill: rgba(6, 182, 212, 0.03);
}
.chart-target-range {
  fill: rgba(16, 185, 129, 0.1);
}
.chart-line-child {
  stroke-width: 3.5;
  fill: none;
  stroke-linecap: round;
}
.chart-dot-child {
  stroke-width: 2;
  stroke: #fff;
  transition: r 0.2s;
}

/* Chart Legend */
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 1.25rem;
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}
.legend-line {
  width: 16px;
  height: 3px;
  border-radius: 2px;
  display: inline-block;
}
.line-p95 { background: rgba(249, 115, 22, 0.6); border-top: 2px dashed rgba(249, 115, 22, 0.6); height: 0; }
.line-p50 { background: rgba(6, 182, 212, 0.8); }
.line-p5 { background: rgba(239, 68, 68, 0.6); border-top: 2px dashed rgba(239, 68, 68, 0.6); height: 0; }
.line-child { background: var(--brand-green); box-shadow: 0 0 8px var(--brand-green); }
.line-target { background: rgba(16, 185, 129, 0.2); height: 8px; border-radius: 1px; }

/* ==========================================
     GROWTH TIPS CARDS SECTION
     ========================================== */
.growth-tips-section {
  display: flex;
  flex-direction: column;
}
.growth-tips-section .section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.tip-card {
  padding: 2rem 1.8rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: var(--transition-smooth);
}
.tip-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.1);
  background-color: rgba(14, 20, 38, 0.65);
}
.tip-card .icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #fff;
  margin-bottom: 1.25rem;
}
.bg-sleep { background: linear-gradient(135deg, #6366f1 0%, #312e81 100%); }
.bg-diet { background: linear-gradient(135deg, #f97316 0%, #7c2d12 100%); }
.bg-exercise { background: linear-gradient(135deg, #eab308 0%, #78350f 100%); }
.bg-posture { background: linear-gradient(135deg, #10b981 0%, #064e3b 100%); }

.tip-card h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}
.tip-card .summary-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.25rem;
  min-height: 54px;
}
.tip-card .detail-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.tip-card .detail-list li {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.tip-card .detail-list li::before {
  content: '•';
  color: var(--brand-green);
  font-size: 1.1rem;
  line-height: 1;
}

/* ==========================================
     GROWTH PHASES & TIMELINE
     ========================================== */
.growth-phases-section {
  padding: 2.2rem;
}
.growth-phases-section h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.8rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.phases-timeline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.phase-col {
  border-left: 2px solid rgba(255, 255, 255, 0.05);
  padding-left: 1.5rem;
  position: relative;
  transition: var(--transition-smooth);
}
.phase-col.border-boy { border-color: rgba(59, 130, 246, 0.15); }
.phase-col.border-girl { border-color: rgba(236, 72, 153, 0.15); }

.phase-header {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: 8px;
}
.phase-header.bg-boy { background-color: rgba(59, 130, 246, 0.12); color: var(--brand-blue); }
.phase-header.bg-girl { background-color: rgba(236, 72, 153, 0.12); color: var(--brand-pink); }

.phase-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.phase-bullets li {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.6;
}
.phase-bullets li strong {
  color: #fff;
  font-weight: 600;
}

/* ==========================================
     EDUCATIONAL GUIDE DETAILS
     ========================================== */
.guide-details-section {
  padding: 2.2rem;
}
.guide-details-section h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.guide-intro {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 2.2rem;
}

.guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}
.guide-card h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.guide-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  list-style: none;
}
.guide-list li {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-muted);
  display: flex;
  gap: 0.75rem;
}
.guide-list li strong {
  color: var(--text-light);
}
.guide-list .num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* Formula Boxes */
.formula-box-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.formula-card {
  padding: 1rem 1.25rem;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
}
.formula-card.formula-boy { background-color: rgba(59, 130, 246, 0.05); border: 1px solid rgba(59, 130, 246, 0.1); }
.formula-card.formula-girl { background-color: rgba(236, 72, 153, 0.05); border: 1px solid rgba(236, 72, 153, 0.1); }

.formula-card .title {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}
.formula-card .val {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-top: 0.2rem;
}
.formula-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Factors Grid */
.factors-comparison-wrap {
  border-top: 1px dashed var(--border-light);
  padding-top: 2rem;
  margin-bottom: 2.5rem;
}
.factors-comparison-wrap h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.factors-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 1.5rem;
}
.factor-block {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
}
.factor-block .pct {
  font-family: 'Outfit', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  opacity: 0.12;
}
.factor-block h5 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
}
.factor-block .bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.factor-block .bullets li {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.factor-block .bullets li::before {
  content: '✓';
  color: var(--brand-green);
  font-weight: 800;
  font-size: 0.85rem;
}

/* Genetic vs Environmental colors */
.genetic-block { border-left: 3px solid var(--brand-blue); }
.environmental-block { border-left: 3px solid var(--brand-green); }
.genetic-block .pct { color: var(--brand-blue); opacity: 0.2; }
.environmental-block .pct { color: var(--brand-green); opacity: 0.2; }

.comparison-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.85rem 1.25rem;
  border-radius: 10px;
}
.comparison-note strong {
  color: #fff;
}

/* FAQ Section */
.guide-faq {
  border-top: 1px dashed var(--border-light);
  padding-top: 2rem;
  margin-bottom: 2.5rem;
}
.guide-faq h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  list-style: none;
}
.faq-list li strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.35rem;
}
.faq-list li p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Warnings/Disclaimer */
.guide-disclaimer {
  border-top: 1px dashed var(--border-light);
  padding-top: 2rem;
}
.guide-disclaimer h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.disclaimer-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.disclaimer-bullets li {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.6;
  position: relative;
  padding-left: 1.25rem;
}
.disclaimer-bullets li::before {
  content: '⚠️';
  position: absolute;
  left: 0;
  top: 0;
  font-size: 0.8rem;
}

/* ==========================================
     FLOATING TOOLBAR CONTROLS
     ========================================== */
.floating-controls-panel {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 1000;
  align-items: center;
}

.progress-ring-wrap {
  position: relative;
  width: 50px;
  height: 50px;
  background: rgba(14, 20, 38, 0.85);
  border: 1px solid var(--border-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.progress-ring-svg {
  position: absolute;
  top: -1px;
  left: -1px;
  transform: rotate(-90deg);
}

.progress-ring-circle-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 3;
}

.progress-ring-circle-indicator {
  fill: none;
  stroke: var(--brand-cyan);
  stroke-width: 3;
  stroke-dasharray: 125.66; /* 2 * PI * r = 2 * 3.14159 * 20 */
  stroke-dashoffset: 125.66;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.1s;
}

.progress-txt {
  font-family: 'Outfit', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-light);
}

.floating-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(14, 20, 38, 0.85);
  border: 1px solid var(--border-light);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  transition: var(--transition-smooth);
}
.floating-btn:hover {
  background: rgba(14, 20, 38, 0.95);
  border-color: var(--brand-cyan);
  color: var(--brand-cyan);
  transform: translateY(-2px);
}

/* ==========================================
     MEDIA QUERIES (Mobile Responsiveness)
     ========================================== */
@media (max-width: 900px) {
  .calculator-grid {
    grid-template-columns: 1fr;
  }
  .app-banner {
    padding: 1.8rem;
  }
  .app-banner h2 {
    font-size: 1.6rem;
  }
  .banner-decor {
    display: none;
  }
  .gender-selector-section {
    flex-direction: column;
    align-items: flex-start;
  }
  .gender-buttons {
    width: 100%;
    max-width: 100%;
  }
  .phases-timeline,
  .guide-grid,
  .factors-split {
    grid-template-columns: 1fr;
  }
  .phase-col {
    padding-left: 0;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1.5rem;
  }
  .phase-col:first-child {
    border-top: none;
    padding-top: 0;
  }
  .main-header {
    margin: 0.5rem 0.5rem 0 0.5rem;
    padding: 0.6rem 1.2rem;
  }
  .header-nav {
    display: none; /* simple mobile dashboard hide navigation */
  }
  .floating-controls-panel {
    bottom: 1rem;
    right: 1rem;
  }
}
