/* Base Reset & Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Brandon_Grotesque;
}

html,
body {
  height: 100%;
  width: 100%;
  background-color: #000;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Layout & Container Styles */
#app {
  background: linear-gradient(120deg, #002f74 0%, #009bdd 100%);
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

#container,
.section {
  max-width: 30rem;
  min-width: 20rem;
  margin: 0 auto 0;
  padding: 1.5rem 1.125rem 1.125rem;
  /* display: flex; */
  /* flex-direction: column; */
  /* align-items: stretch; */
  /* position: relative; */
  z-index: 2;
}

/* Typography */
.headline {
  font-size: 1.5rem;
  color: #eeb33b;
  text-transform: uppercase;
  line-height: 1;
}

.hashtag {
  font-size: 2.85rem;
  color: #eeb33b;
  font-weight: 500;
  line-height: 1;
}

.subline {
  text-transform: uppercase;
  color: #fff;
  font-weight: 500;
  font-size: 1.2rem;
}

/* Form Styles */
.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1.125rem 0;
}

.form-group label {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
  display: block;
}

.form-group i {
  color: #eeb33b;
  margin-right: 0.375rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.75rem 1.125rem;
  border-radius: 1.375rem;
  border: none;
  outline: none;
  font-size: 1rem;
  background: #fff;
  color: #00306e;
  margin: 0.375rem 0 0.125rem;
  box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.07);
  transition: box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  box-shadow: 0 0 0 0.125rem #eeb33b;
}

/* Checkbox Styles */
.checkbox-container {
  margin: 0.5rem 0 0;
  display: flex;
  align-items: center;
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checkbox-wrapper input[type="checkbox"] {
  accent-color: #eeb33b;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 0.3125rem;
  margin-right: 0.375rem;
}

.checkbox-wrapper label {
  color: #fff;
  font-size: 1rem;
  font-weight: 400;
}

/* Button Styles */
.form button[type="submit"],
button.primary {
  width: 100%;
  background: #eeb33b !important;
  color: #fff !important;
  font-size: 1.2rem;
  font-weight: bold;
  border: none;
  border-radius: 1.75rem;
  padding: 0.875rem 0;
  margin-top: 0.625rem;
  box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  line-height: 1.25rem;
}

.form button[type="submit"] img,
button.primary img,
button#restart img {
  max-height: 1em;
  max-width: 1em;
  display: inline-block;
  vertical-align: middle;
  margin-left: 0.6rem;
  margin-top: -0.25rem;
}

button#restart {
  color: #fff !important;
  background: #eeb33b !important;
}

/* User Form Container */
#user-form {
  border-radius: 0.25rem;
  box-shadow: 0 0.625rem 0.625rem rgba(0, 0, 0, 0.2);
  margin: 0 0.125rem;
  padding: 0.25rem;
}

.form-title h2 {
  color: #fff;
  font-size: 1.5rem;
}

.form-title p {
  color: #eeb33b;
  font-size: 1rem;
  margin-top: -0.5rem;
}

/* Background Elements */
.swirl {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.1);
  z-index: 1;
}

.logos {
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 111;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 1rem;
}

.abbott-logo,
.ensure-logo {
  max-height: 3rem;
  height: 100%;
}

/* Calibration Page Styles */
#calibration-page .container {
  max-width: 26.875rem;
  margin: 0 auto;
  padding: 0;
  background: none;
  box-shadow: none;
  border: none;
}

#calibration-page h1 {
  color: #ffcc4d;
  font-size: 2rem;
  text-align: center;
  margin: 0.7rem 0 0.2rem;
  letter-spacing: 0.01rem;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1;
}

#calibration-page h2 {
  color: #ffffff;
  font-size: 1.5rem;
  text-align: center;
  margin: 0.7rem 0 0.2rem;
  letter-spacing: 0.01rem;
}

#calibration-page .calibration-instructions,
#user-form {
  background: linear-gradient(180deg, #0f5c9c 0%, #2fa4db 100%);
  border-radius: 1.375rem;
  border: 0.09375rem solid #b3e0ff44;
  box-shadow: 0 0.25rem 1.125rem rgba(0, 0, 0, 0.2);
  padding: 1.25rem;
  margin: 0.5rem 0 1.5rem;
  position: relative;
}
#calibration-page .calibration-instructions {
  padding: 1rem 1rem 1rem 1rem;
}

#calibration-page .calibration-instructions h3 {
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  margin: 0 0 1.2rem;
}

/* Calibration Steps */
.calibration-steps {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.calibration-steps .step {
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
  margin-bottom: 1.2rem;
}

.calibration-steps .step img {
  width: 4rem;
  object-fit: contain;
  flex-shrink: 0;
  margin: 0.1rem 0;
  background: none;
  border-radius: 0;
  box-shadow: none;
}

.calibration-steps .step .step-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.calibration-steps .step h1 {
  color: #ffcc4d;
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 0.1rem;
  line-height: 1.1;
  min-width: 1.7rem;
  text-align: left;
  font-family: inherit;
}

.calibration-steps .step p {
  color: #fff;
  font-size: 1.08rem;
  margin: 0;
  line-height: 1.2;
  text-align: left;
}

.calibration-steps .step p strong,
.calibration-steps .step p b {
  color: #ffcc4d;
  font-weight: 700;
}

.calibration-steps .step p .step-num {
  color: #ffcc4d;
  font-size: 1.15rem;
  font-weight: 700;
  margin-right: 0.3rem;
}

/* Progress Bar */
#calibration-status {
  color: #fff;
  font-size: 1.15rem;
  text-align: center;
  margin: 1.2rem 0 0.7rem;
  font-weight: 500;
}

.progress-container {
  width: 100%;
  margin: 0.5rem 0 1.2rem;
  display: flex;
  justify-content: center;
}

.progress-bar {
  width: 100%;
  height: 0.875rem;
  background: #0e3a5e;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.1);
  position: relative;
}

#calibration-progress.progress {
  height: 100%;
  background: linear-gradient(90deg, #ffcc4d 0%, #f9d976 100%);
  border-radius: 0.5rem;
  width: 0%;
  transition: width 0.5s cubic-bezier(0.4, 2, 0.6, 1);
}

/* Calibration Button */
#start-calibration.btn.primary {
  background: #eeb33b;
  color: #00306e;
  font-size: 1.15rem;
  font-weight: bold;
  border: none;
  border-radius: 1.75rem;
  padding: 0.9rem 0;
  width: 80%;
  box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  margin: 0 auto;
  display: block;
}

#start-calibration.btn.primary:disabled {
  background: #bdbdbd;
  color: #888;
  cursor: not-allowed;
}

/* Modal Styles */
.modal-backdrop {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 32, 64, 0.55);
  z-index: 1001;
  pointer-events: all;
}

#permission-backdrop.modal-backdrop.hidden,
#ios-permission-notice.permission-notice.hidden {
  display: none;
}

#ios-permission-notice.permission-notice {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1002;
  max-width: 95vw;
  min-width: 17.5rem;
  min-height: 7.5rem;
  box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1rem;
  background: linear-gradient(120deg, #1e6fae 0%, #2e8bc0 100%);
  border-radius: 1.125rem;
  border: 0.09375rem solid #b3e0ff44;
  padding: 1.5rem 1.2rem;
  margin: 1.2rem 0 1.5rem;
}

#ios-permission-notice .notice-icon {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  font-size: 2.2rem;
  color: #ffcc4d;
  margin-right: 0.5rem;
}

#ios-permission-notice .notice-text {
  color: #fff;
  font-size: 1.08rem;
  line-height: 1.5;
}

#ios-permission-notice .notice-text h4 {
  color: #ffcc4d;
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.3rem;
}

#ios-permission-notice .notice-text p {
  margin: 0.2rem 0;
}

#ios-permission-notice .notice-text ol {
  margin: 0.5rem 0 0.2rem 1.2rem;
  color: #fff;
  font-size: 0.98rem;
}

#ios-permission-notice .notice-text li {
  margin-bottom: 0.2rem;
}

/* Media Queries */
@media (max-height: 50rem) {
  body {
    font-size: 0.75rem;
  }

  .form-group input,
  .form-group select {
    padding: 0.6rem;
    font-size: 0.98rem;
    margin: 0.0625rem 0 0;
  }

  .checkbox-wrapper input[type="checkbox"] {
    width: 0.875rem;
    height: 0.875rem;
  }

  .checkbox-wrapper label {
    font-size: 1rem;
  }

  .abbott-logo,
  .ensure-logo {
    max-height: 2rem;
  }

  #calibration-page .calibration-steps .step {
    margin-bottom: 0.5rem;
  }

  #calibration-page .calibration-steps {
    gap: 0;
  }

  #calibration-page .calibration-steps .step img {
    width: 3rem !important;
  }

  #calibration-page .calibration-steps .step h1 {
    font-size: 1.2rem !important;
  }

  #calibration-page .calibration-steps .step p {
    font-size: 0.9rem !important;
  }

  #user-form {
    margin: 0 auto 0;
  }
}


/*
      scoreText.style.marginTop = "0.2rem";
      scoreText.style.letterSpacing = "0.04em";
      scoreText.style.fontWeight = "800";
      scoreText.style.fontSize = "1.1rem";
      scoreText.style.textTransform = "uppercase";
      scoreText.style.color = this.getColorForCategory(color);
      scoreEmoji.style.fontSize = "2.1rem";
      scoreEmoji.style.marginBottom = "0.1rem";
      scoreCategory.style.textAlign = "center";

*/

.score-display .score-emoji {
  display: block;
  margin-bottom: 0.1rem;
  font-size: 2.1rem;
  text-align: center;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-top: 0.2rem;
  text-transform: uppercase;
}

.score-display.score-text {
  display: block;
  margin-top: 0.2rem;
  letter-spacing: 0.04em;
  font-weight: 800;
  font-size: 1.1rem;
  text-transform: uppercase;
  text-align: center;
}

@media (max-height: 700px) {
  /* .score-display #total-reps {
    font-size: 3em;
  } */
  .score-display .score-emoji {
    display: inline-block;
    font-size: 1.1rem;
    margin-right: 0.2rem;
  }
  .score-display.score-text {
    font-size: 1.2rem;
  }
}

@media (min-height: 800px) {
  .recommendation-box {
    max-height: 220px !important;
  }
}

@media (max-width: 380px) {
  #calibration-page .container {
    max-width: 98vw;
    padding: 0 2vw;
  }

  #calibration-page .calibration-instructions {
    padding: 1rem 0.8rem 0.8rem 1rem;
  }

  #calibration-page .calibration-steps .step {
    margin-bottom: 0rem;
  }

  #calibration-page .calibration-steps .step p {
    font-size: 1rem !important;
    line-height: 1rem !important;
  }

  .progress-bar {
    width: 98%;
  }

  #ios-permission-notice.permission-notice {
    min-width: 0;
    width: 96vw;
    max-width: 98vw;
  }

  #ios-permission-notice .notice-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
  }

  #calibration-page .calibration-steps .step img {
    width: 3.5rem;
  }

  #calibration-page .calibration-steps .step h1 {
    font-size: 1.8rem;
  }

  #calibration-page .calibration-steps .step p {
    font-size: 1rem;
  }

  #user-form {
    padding: 1rem 1rem;
  }

  #user-form .form-group label {
    margin-bottom: 0rem;
  }

  #calibration-page h2 {
    font-size: 1.2rem;
  }
}

/* --- INSTRUCTIONS PAGE STYLES --- */
#instructions-page .container {
  max-width: 26.875rem;
  margin: 0 auto;
  padding: 0;
  background: none;
  box-shadow: none;
  border: none;
}
.section {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
}

.lines-wrapper {
  text-align: center;
}

/* --- EXERCISE PAGE STYLES --- */
#exercise-page .container {
  max-width: 28rem;
  margin: 0 auto;
  padding: 0;
  background: none;
  box-shadow: none;
  border: none;
}

#exercise-page h1 {
  display: none;
}

.exercise-container {
  background: linear-gradient(120deg, #eaf6ff 0%, #b3e0ff 100%);
  border-radius: 1.5rem;
  box-shadow: 0 0.25rem 1.125rem rgba(0, 0, 0, 0.1);
  border: 0.09375rem solid #b3e0ff44;
  padding: 1.2rem 1.2rem 1.2rem 1.2rem;
  margin: 1.5rem 0 1.5rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 320px;
  min-height: 140px;
}

.exercise-numbers {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  position: relative;
}

.counter-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
}

#rep-counter {
  color: #009bdd;
  font-size: 5.2rem !important;
  font-weight: 800;
  margin-bottom: 0.2rem;
  line-height: 1;
}

.rep-label {
  color: #002d72;
  font-size: 1.05rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.01em;
  margin-top: 0.2rem;
}

.divider {
  width: 1px;
  height: 80px;
  background: #b3d0e6;
  margin: 0 2.2rem;
  align-self: center;
  border-radius: 1px;
}

.timer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
}

.timer {
  position: relative;
  width: 160px !important;
  height: 160px !important;
  min-width: 160px !important;
  min-height: 160px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
}

#timer-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 160px !important;
  height: 160px !important;
  border-radius: 50%;
  background: conic-gradient(
    #00aeef var(--progress, 0deg),
    #002d72 0deg 360deg
  );
  z-index: 1;
}

.timer-ring-inner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 136px !important;
  height: 136px !important;
  background: #fff;
  border-radius: 50%;
  z-index: 2;
  box-shadow: 0 0 0 2px #eaf6ff;
}

.timer-text {
  position: absolute;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 160px !important;
  height: 160px !important;
  color: #002d72;
  font-size: 2.8rem !important;
  font-weight: 700;
  left: 0;
  top: 0;
}

#timer-seconds {
  font-size: 4.2rem !important;
  font-weight: 800;
  color: #002d72;
  line-height: 1.1;
}

.timer-label {
  font-size: 0.75rem !important;
  color: #002d72;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin-top: -0.8rem;
}

/* Instructions Card */
.exercise-instructions {
  background: linear-gradient(120deg, #1e6fae 0%, #2e8bc0 100%);
  border-radius: 1.375rem;
  padding: 1.5rem 1.2rem 1.2rem 1.2rem;
  margin-bottom: 1.5rem;
  margin-top: 0.5rem;
  color: #fff;
  box-shadow: 0 0.25rem 1.125rem rgba(0, 0, 0, 0.1);
}
.exercise-instructions h3 {
  color: #ffcc4d;
  font-size: 1.25rem;
  font-weight: 700;
  text-align: left;
  margin-bottom: 1.2rem;
}
.exercise-instruction {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.instruction-step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  font-size: 1.08rem;
}
.instruction-step i {
  color: #ffcc4d;
  font-size: 1.5rem;
  margin-top: 0.1rem;
}
.instruction-step p {
  color: #fff;
  font-size: 1.08rem;
  margin: 0;
  line-height: 1.2;
}
.posture-tip {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  color: #ffcc4d;
  font-size: 1.08rem;
  margin-top: 0.5rem;
}
.posture-tip i {
  color: #ffcc4d;
  font-size: 1.3rem;
  margin-top: 0.1rem;
}
.posture-tip p {
  color: #ffcc4d;
  font-size: 1.08rem;
  margin: 0;
  line-height: 1.2;
}

/* Disabled Comenzar button style */
button.primary:disabled,
#start-exercise:disabled {
  background: #bdbdbd !important;
  color: #888 !important;
  cursor: not-allowed;
  opacity: 0.7;
}

@media (max-width: 500px) {
  #timer-progress,
  .timer,
  .timer-text {
    width: 120px !important;
    height: 120px !important;
    min-width: 120px !important;
    min-height: 120px !important;
  }
  .timer-ring-inner {
    width: 102px !important;
    height: 102px !important;
  }
  .timer-text {
    font-size: 2.1rem !important;
  }
  #timer-seconds {
    font-size: 3.2rem !important;
  }
  #rep-counter {
    font-size: 3.8rem !important;
  }

  #instructions-page .instruction-steps {
    gap: 0.5rem;
  }
  #instructions-page .instructions-box {
    padding: 1rem;
    margin-bottom: 0.5rem;
  }
  #instructions-page .position-guide {
    width: 100%;
    padding: 0;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
  }
  #instructions-page .position-guide-container {
    width: 100%;
    padding: 1rem;
  }
  #exercise-page .exercise-container {
    margin-bottom: 0.5rem;
  }
  #exercise-page .exercise-instructions-box {
    margin-bottom: 0.5rem;
    padding-bottom: 1rem;
    padding-top: 1rem;
  }

  #exercise-page .instruction-steps {
    gap: 0.5rem;
  }
  #exercise-page .instruction-step {
    gap: 0.5rem;
  }
}

/* --- RESULTS SCREEN STYLES --- */
#results-container {
  min-height: 100%;
  padding: 2.2rem 0 1.2rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

#results-container .container.results-container {
  background: none;
  box-shadow: none;
  border: none;
  padding: 0;
  max-width: 370px;
  margin: 0 auto;
}

/* Hashtag and title */
#results-container .hashtag {
  color: #fec43b;
  font-size: 2.2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.2rem;
  letter-spacing: 0.01em;
}
#results-container .result-title {
  color: #fff;
  font-size: 1.1rem;
  text-align: center;
  text-transform: uppercase;
  font-weight: 600;
  /*margin-bottom: 1.2rem;*/
  letter-spacing: 0.08em;
}

/* Main result card */
.score-display {
  background: linear-gradient(120deg, #eaf6ff 0%, #b3e0ff 100%);
  border-radius: 1.5rem;
  box-shadow: 0 0.25rem 1.125rem rgba(0, 0, 0, 0.1);
  border: 0.09375rem solid #b3e0ff44;
  padding: 1.2rem 0.5rem 0.7rem 0.5rem;
  margin-bottom: 1.1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}
#score-category {
  font-size: 1rem;
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.01em;
}
.green-result #score-category {
  color: #009e4f !important;
}
.yellow-result #score-category {
  color: #fec43b !important;
}
.red-result #score-category {
  color: #e53935 !important;
}

.score-display-label {
  color: #002d72;
  font-size: 1.05rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.01em;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

/* --- METRICS PILLS (AGE & GENDER) - FULLY ROUNDED, GAP, VERTICAL PADDING, RESPONSIVE TEXT --- */
.metrics-panel {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 0.7rem;
  margin-bottom: 1.2rem;
  width: 100%;
  max-width: 370px;
}
.metric-card {
  background: linear-gradient(180deg, #2d72aa 0%, #2094cf 100%);
  border-radius: 1.375rem;
  border: 0.09375rem solid #b3e0ff44;
  box-shadow: 0 0.25rem 1.125rem rgba(0, 0, 0, 0.2);
  padding: 0.7rem 1.2rem 0.7rem 1.2rem;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  min-width: 0;
  min-height: 44px;
  width: 50%;
  position: relative;
  margin: 0;
}
.metric-title {
  color: #eaf6ff;
  font-size: 1.05rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.85;
  margin: 0;
  padding: 0;
  align-self: flex-end;
}
.metric-value {
  color: #fff;
  font-size: 1.7rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  margin: 0;
  padding: 0;
  align-self: flex-end;
  text-align: right;
  flex: 1 1 auto;
}

/* Recommendation box */
.recommendation-box {
  background: linear-gradient(180deg, #2d72aa 0%, #2094cf 100%);
  border-radius: 1.375rem;
  border: 0.09375rem solid #b3e0ff44;
  box-shadow: 0 0.25rem 1.125rem rgba(0, 0, 0, 0.2);
  padding: 1.2rem 1.2rem 1.2rem 1.2rem;
  margin-bottom: 1.2rem;
  color: #fff;
  min-height: 110px;
  max-height: 170px;
  overflow-y: auto;
  font-size: 1.08rem;
  position: relative;
  display: none;
}
.recommendation-box h3 {
  color: #fec43b;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.7rem;
  margin-top: 0;
}
.recommendation-box ul {
  margin: 0.5rem 0 0 1.2rem;
  color: #fff;
  font-size: 1.05rem;
}
.recommendation-box li {
  margin-bottom: 0.3rem;
}
.recommendation-box::-webkit-scrollbar {
  width: 7px;
  background: #2e8bc0;
  border-radius: 6px;
}
.recommendation-box::-webkit-scrollbar-thumb {
  background: #fec43b;
  border-radius: 6px;
}

/* Restart button */
#restart {
  width: 100%;
  max-width: 340px;
  background: #fec43b !important;
  color: #00306e !important;
  font-size: 1.25rem;
  font-weight: bold;
  border: none;
  border-radius: 2.2rem;
  padding: 1.1rem 0;
  margin: 1.2rem auto 0 auto;
  box-shadow: 0 0.12rem 0.5rem rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  display: block;
  text-align: center;
  letter-spacing: 0.01em;
}
#restart:active {
  background: #e6b200 !important;
}

/* Responsive adjustments */
@media (max-width: 500px) {
  #results-container .container.results-container {
    max-width: 98vw;
    padding: 0 2vw;
  }
  .score-display {
    padding: 1.1rem 0.2rem 0.6rem 0.2rem;
  }
  .metrics-panel {
    max-width: 98vw;
    gap: 0.5rem;
  }
  .metric-card {
    padding: 0.7rem 0.7rem 0.7rem 0.7rem;
    min-height: 36px;
    width: 50%;
  }
  .recommendation-box {
    padding: 1rem 0.7rem 1rem 0.7rem;
    font-size: 0.98rem;
    min-height: 90px;
    max-height: 120px;
  }
  #restart {
    font-size: 1.1rem;
    padding: 0.9rem 0;
    max-width: 98vw;
  }
  .metric-value {
    font-size: 1.5rem;
  }
  .metric-title {
    font-size: 0.95rem;
  }
}

/* Results Page Styles */
.results-hashtag {
  font-size: 2rem;
  color: #ffcc4d;
  font-weight: bold;
  text-align: center;
  margin-bottom: 0.5rem;
}

.results-title {
  color: white;
  text-align: center;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

/* Instructions Page Styles */
.instructions-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.5rem;
}

.position-guide {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.5rem;
}

.position-guide-container {
  background: linear-gradient(180deg, #2d72aa 0%, #2094cf 100%);
  border-radius: 1.375rem;
  border: 0.09375rem solid #b3e0ff44;
  box-shadow: 0 0.25rem 1.125rem rgba(0, 0, 0, 0.2);
  padding: 1.5rem;
  display: flex;
  gap: 2rem;
}

.position-item {
  text-align: center;
}

.position-icon {
  height: 60px;
  margin-bottom: 0.5rem;
}

.position-label {
  color: white;
  font-size: 1rem;
}

.instructions-box {
  background: linear-gradient(180deg, #2d72aa 0%, #2094cf 100%);
  border-radius: 1.375rem;
  border: 0.09375rem solid #b3e0ff44;
  box-shadow: 0 0.25rem 1.125rem rgba(0, 0, 0, 0.2);
  border-radius: 1.375rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.instruction-steps {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.instruction-step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.step-number {
  color: #ffcc4d;
  font-size: 2rem;
  font-weight: 700;
  min-width: 2.5rem;
  text-align: left;
  font-family: inherit;
}

.step-text {
  color: #fff;
  font-size: 1.1rem;
  line-height: 1.3;
}

.step-text .highlight {
  color: #ffcc4d;
}

.start-button-container {
  display: flex;
  justify-content: center;
}

.start-button {
  width: 80%;
  max-width: 320px;
  font-size: 1.2rem;
}

/* Exercise Page Styles */
.exercise-instructions-box {
  background: linear-gradient(180deg, #2d72aa 0%, #2094cf 100%);
  border-radius: 1.375rem;
  border: 0.09375rem solid #b3e0ff44;
  box-shadow: 0 0.25rem 1.125rem rgba(0, 0, 0, 0.2);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.hidden {
  display: none;
}

/* --- NEW RESULTS PILLS (NUMBER RIGHT, LABEL LEFT, MATCH SCREENSHOT) --- */
.results-pills-row {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 1.2rem;
  margin-bottom: 1.2rem;
  width: 100%;
}
.result-pill {
  flex: 1 1 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, #2989d8 0%, #207cca 100%);
  border-radius: 1.5rem;
  border: 2px solid #b3e0ff;
  padding: 0.7rem 1.5rem;
  color: #fff;
  box-shadow: none;
  min-width: 0;
  min-height: 48px;
  width: 0;
}
.pill-label {
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  margin: 0;
  opacity: 0.85;
  text-align: left;
  white-space: nowrap;
  text-transform: none;
}
.pill-value {
  font-size: 2.1rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-align: right;
  margin-left: 1.2rem;
  white-space: nowrap;
}
.muscular-age-card {
  margin: 0 auto 1.2rem auto;
  border-radius: 1.5rem;
  padding: 1.1rem 0rem 0rem 0rem;
  max-width: 320px;
  text-align: center;
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
  background: #43a047;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: background 0.3s;
}
.muscular-age-card.green { background: #43a047; }
.muscular-age-card.yellow { background: #fbc02d; }
.muscular-age-card.red { background: #d32f2f; }
.muscular-age-label {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  letter-spacing: 0.01em;
}
.muscular-age-value {
  font-size: 4.2rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 0.2rem;
  line-height: 1.1;
}
.muscular-age-years {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: 0.01em;
}
.muscular-age-feedback {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin-top: 0.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
#muscular-age-emoji {
  font-size: 1.5rem;
  margin-right: 0.2rem;
}
#muscular-age-text {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
/* Hide old score display */
.score-display, #score-category { display: none !important; }
.metrics-panel, .metric-card { display: none !important; }
.muscular-age-panel { display: none !important; }

@media (max-width: 600px) {
  .results-pills-row { gap: 0.5rem; }
  .result-pill { padding: 0.5rem 0.7rem; min-height: 38px; }
  .pill-label { font-size: 0.8rem; }
  .pill-value { font-size: 1.2rem; }
}

/* --- PHOTO SIMULATION MODAL: FULLSCREEN, CLEAN, MATCHES SCREENSHOT --- */
#photo-simulation-screen {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #0b2942;
  z-index: 10000;
  margin: 0;
  padding: 0;
  overflow: hidden;
}



#photo-modal-content {
  position: relative;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}
#photo-video, #photo-preview {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #222;
  border-radius: 0;
  margin: 0;
  padding: 0;
  z-index: 1;
  box-shadow: none;
  border: none;
}
.photo-oval-overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 260px;
  height: 340px;
  transform: translate(-50%, -50%);
  border: 3px solid #fff;
  border-radius: 50% / 45%;
  pointer-events: none;
  background: none;
  z-index: 2;
}
.photo-capture-btn {
  position: absolute;
  left: 50%;
  bottom: 48px;
  transform: translateX(-50%);
  width: 72px;
  height: 72px;
  background: #fff;
  border-radius: 50%;
  border: none;
  box-shadow: none;
  cursor: pointer;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.photo-capture-btn:active {
  background: #eaeaea;
}
.photo-action-row {
  position: absolute;
  left: 0;
  bottom: 40px;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  z-index: 10;
}
.photo-action-btn {
  background: #fec43b;
  color: #00306e;
  border: none;
  border-radius: 2rem;
  font-size: 1.1rem;
  font-weight: bold;
  padding: 0.7rem 2.2rem;
  box-shadow: none;
  cursor: pointer;
  transition: background 0.2s;
}
.photo-action-btn:active {
  background: #e6b200;
}
#close-photo-sim-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(0,0,0,0.4);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.5rem;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
#close-photo-sim-btn:active {
  background: rgba(0,0,0,0.7);
}
@media (max-width: 600px) {
  #photo-simulation-screen, #photo-modal-content, #photo-video, #photo-preview {
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    left: 0 !important;
    top: 0 !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .photo-oval-overlay {
    width: 60vw;
    height: 80vw;
    min-width: 160px;
    min-height: 220px;
    max-width: 320px;
    max-height: 400px;
  }
  .photo-capture-btn {
    width: 56px;
    height: 56px;
    bottom: 32px;
  }
  .photo-action-row {
    bottom: 24px;
    gap: 0.7rem;
  }
  .photo-action-btn {
    font-size: 1rem;
    padding: 0.6rem 1.3rem;
  }
  #close-photo-sim-btn {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
    top: 12px;
    right: 12px;
  }
}

/* --- PHOTO SIMULATION RESULT SCREEN --- */
.photo-result-container {
  max-width: 340px;
  margin: 0 auto;
  padding: 0 0 2.2rem 0;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100%;
}
.photo-result-header {
  margin-bottom: 1.2rem;
  text-align: center;
}
.photo-result-hashtag {
  color: #fec43b;
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 0.2rem;
}
.photo-result-title {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
  letter-spacing: 0.08em;
}
.photo-result-img {
  display: block;
  width: 100%;
  max-width: 260px;
  height: auto;
  border-radius: 1.2rem;
  margin: 0 auto 0.7rem auto;
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
  background: #fff;
  border: 4px solid #fff;
}
.photo-result-btn-row {
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  margin: 1rem 0 0.5rem 0;
}
.photo-result-btn {
  background: #fec43b;
  color: #fff;
  border: none;
  border-radius: 2rem;
  font-size: 1.1rem;
  font-weight: bold;
  padding: 0.4rem 1rem;
  box-shadow: none;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
}
.photo-result-btn:active {
  background: #e6b200;
}
.photo-share-icon {
  margin-right: 0.5em;
  font-size: 1.1em;
  vertical-align: middle;
}
.photo-result-restart-btn {
  width: 100%;
  background: #fec43b;
  color: #fff;
  font-size: 1.1rem;
  font-weight: bold;
  border: none;
  border-radius: 2rem;
  padding: 0.4rem 1rem;
  margin: 0.2rem 0.2rem 0.2rem 0.rem;
  display: block;
  text-align: center;
  letter-spacing: 0.01em;
  transition: background 0.2s;
}
.photo-result-restart-btn:active {
  background: #e6b200;
}
@media (max-width: 500px) {
  .photo-result-container {
    max-width: 98vw;
    padding: 0 2vw 4.2rem 2vw;
  }
  .photo-result-img {
    max-width: 90vw;
  }
}

      /* Photo simulation screen styles */
      #photo-simulation-screen {
        background: linear-gradient(45deg, #009bdd 0%, #002f74 100%);
        min-height: 100%;
        width: 100%;
        position: fixed;
        top: 0; left: 0;
        z-index: 10000;
        display: flex;
        align-items: center;
        justify-content: center;
      }
      #photo-simulation-screen .container {
        background: rgba(255,255,255,0.97);
        border-radius: 18px;
        box-shadow: 0 4px 24px rgba(0,0,0,0.10);
        padding: 24px 12px 18px 12px;
        max-width: 340px;
        width: 94vw;
        margin: 0 auto;
        text-align: center;
      }
      #photo-simulation-screen h2 {
        color: #002f74;
        font-weight: 700;
        margin-bottom: 10px;
      }
      #photo-simulation-screen button {
  background: #eeb33b !important;
  color: #fff !important;
  font-size: 1.2rem;
  font-weight: bold;
  border: none;
  border-radius: 1.75rem;
  padding: 0.875rem 0;
  margin-top: 0.625rem;
  box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  line-height: 1.25rem;
      }

      #photo-simulation-screen button.photo-action-btn {
        min-width: 120px;
      }
      #photo-simulation-screen button:active {
        background: #007bb8;
      }
      #photo-simulation-screen #photo-loading {
        color: #002f74;
        font-weight: 500;
      }
      #photo-simulation-screen #photo-result-section img {
        border: 3px solid #009bdd;
      }
      #photo-simulation-screen #close-photo-sim-btn {
        background: #fff;
        color: #009bdd;
        border: 1px solid #009bdd;
        margin-top: 18px;
      }
      #photo-simulation-screen #close-photo-sim-btn:active {
        background: #e3f6ff;
      }
      @media (max-width: 500px) {
        #photo-simulation-screen .container {
          padding: 10vw 2vw 6vw 2vw;
          max-width: 98vw;
        }
        #photo-simulation-screen video,
        #photo-simulation-screen img {
          width: 70vw !important;
          height: 70vw !important;
        }
      }
      .recommendation-box.hide-recommendation {
        display: none !important;
      }
      .photo-spinner {
        border: 4px solid #009bdd;
        border-top: 4px solid #fff;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        animation: spin 1s linear infinite;
        display: inline-block;
      }
      @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
      }

#simulate-photo-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 18px 0 0 0;
}
#photo-sim-instructions {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.18);
  letter-spacing: 0.01em;
}
.photo-camera-btn {
  width: 72px;
  height: 72px;
  background: linear-gradient(180deg, #009bdd 0%, #005fa3 100%);
  border-radius: 50%;
  border: 4px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.13);
  margin: 0 auto;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}
.photo-camera-btn:active {
  background: #007bb8;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.photo-camera-btn img {
  width: 38px;
  height: 38px;
  display: block;
}
