* {
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', system-ui, sans-serif;
  margin: 0;
  background: #f3ecd9;
  color: #1f3a5a;
}

header {
  background: #f3ecd9;
  text-align: center;
  padding: 20px 24px 8px;
}

header img {
  height: 130px;
  display: block;
  margin: 0 auto;
}

header p {
  font-size: 1.1em;
  color: #1f3a5a;
  opacity: 0.85;
  margin: 4px 0 0;
}

main {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 16px rgba(31, 58, 90, 0.12);
  max-width: 600px;
  margin: 16px;
}

@media (min-width: 640px) {
  main { margin: 24px auto; }
}

h2 {
  color: #1f3a5a;
  margin-top: 0;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: #dcd5c2;
  outline: none;
  margin: 12px 0;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #1f3a5a;
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: #1f3a5a;
  cursor: pointer;
}

#skillValue {
  font-weight: bold;
  font-size: 1.2em;
  color: #1f3a5a;
  margin-left: 8px;
}

#weaknesses label {
  display: block;
  padding: 12px 14px;
  margin: 8px 0;
  border: 1px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

#weaknesses label:hover {
  background: #f0f2f7;
  border-color: #1f3a5a;
}

#weaknesses label:has(input:checked) {
  background: #e4e9f1;
  border-color: #1f3a5a;
  font-weight: 600;
}

#weaknesses input {
  margin-right: 10px;
  accent-color: #1f3a5a;
}

#saveBtn {
  background: #1f3a5a;
  color: #f3ecd9;
  border: none;
  padding: 14px 26px;
  font-size: 1.05em;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 20px;
  width: 100%;
  box-shadow: 0 4px 12px rgba(31, 58, 90, 0.3);
  transition: transform 0.1s, box-shadow 0.15s;
}

#saveBtn:hover {
  background: #16293f;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(31, 58, 90, 0.4);
}
.badge {
  display: inline-block;
  background: #1f3a5a;
  color: #f3ecd9;
  padding: 4px 14px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.95em;
}

.intro {
  color: #555;
  margin: 12px 0 20px;
}

h3 {
  color: #1f3a5a;
  margin-top: 26px;
  margin-bottom: 8px;
}

.drill {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #f7f4ec;
  border-left: 4px solid #1f3a5a;
  border-radius: 8px;
  padding: 14px 16px;
  margin: 10px 0;
  transition: transform 0.1s, box-shadow 0.15s;
}

.drill:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(31, 58, 90, 0.12);
}

.num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  background: #1f3a5a;
  color: #f3ecd9;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9em;
  font-weight: 600;
}

.drill p {
  margin: 4px 0 0;
  color: #555;
}
.editBtn {
  display: inline-block;
  margin-top: 24px;
  color: #1f3a5a;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid #1f3a5a;
  padding: 10px 18px;
  border-radius: 8px;
}
.editBtn:hover {
  background: #1f3a5a;
  color: #f3ecd9;
}
.progress {
  background: #e4e9f1;
  color: #1f3a5a;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 1.05em;
  margin: 12px 0;
}
.drill {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #f7f4ec;
  border-left: 4px solid #1f3a5a;
  border-radius: 8px;
  padding: 14px 16px;
  margin: 10px 0;
  transition: opacity 0.4s, transform 0.4s;
}
.drill.fading {
  opacity: 0;
  transform: translateX(20px);
}
.drillCheck {
  width: 22px;
  height: 22px;
  accent-color: #1f3a5a;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
}
#messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
  max-height: 60vh;
  overflow-y: auto;
}
.msg {
  padding: 10px 14px;
  border-radius: 12px;
  max-width: 80%;
  line-height: 1.4;
}
.msg.user {
  background: #1f3a5a;
  color: #f3ecd9;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.msg.coach {
  background: #f7f4ec;
  color: #1f3a5a;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
#inputRow {
  display: flex;
  gap: 8px;
}
#userInput {
  flex: 1;
  min-width: 0;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1em;
}
#sendBtn {
  flex-shrink: 0;
  background: #1f3a5a;
  color: #f3ecd9;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}
.homeCard {
  display: block;
  background: #1f3a5a;
  color: #f3ecd9;
  text-decoration: none;
  padding: 20px;
  border-radius: 12px;
  margin: 12px 0;
  transition: transform 0.1s, box-shadow 0.15s;
}
.homeCard:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(31, 58, 90, 0.3);
}
.homeCardTitle {
  display: block;
  font-size: 1.2em;
  font-weight: 600;
}
.homeCardSub {
  display: block;
  font-size: 0.9em;
  opacity: 0.85;
  margin-top: 4px;
}
.backLink {
  display: inline-block;
  margin: 16px 0 0 16px;
  color: #1f3a5a;
  text-decoration: none;
  font-weight: 600;
}
.backLink:hover {
  text-decoration: underline;
}
#home {
  background: transparent;
  box-shadow: none;
  padding: 0 4px;
  max-width: 440px;
}
.appHeader { display: flex; align-items: center; gap: 9px; margin: 8px 0 22px; }
.appLogo { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.appName { color: #1f3a5a; font-weight: 600; font-size: 16px; }
.greeting { font-size: 24px; font-weight: 700; color: #1f3a5a; line-height: 1.3; margin-bottom: 20px; }
.statCard { background: #1f3a5a; border-radius: 16px; padding: 18px 20px; margin-bottom: 22px; }
.statLabel { color: #aeb9cc; font-size: 13px; }
.statNum { color: #f3ecd9; font-size: 28px; font-weight: 600; margin: 2px 0 14px; }
.statNum span { font-size: 15px; color: #9fb0c8; }
.statBar { height: 6px; background: #33517a; border-radius: 99px; overflow: hidden; }
.statFill { height: 100%; background: #e3b566; border-radius: 99px; }
.rowCard { display: flex; align-items: center; gap: 14px; background: #fff; border-radius: 14px; padding: 15px; margin-bottom: 11px; text-decoration: none; }
.rowIcon { width: 40px; height: 40px; border-radius: 12px; background: #eef1e5; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.rowText { flex: 1; }
.rowTitle { color: #1f3a5a; font-weight: 600; font-size: 15px; }
.rowSub { color: #7a8496; font-size: 12px; }
.rowChevron { color: #c2c9d2; font-size: 20px; }
.appHeader { display: flex; justify-content: center; margin: 12px 0 22px; }
.appLogo { height: 80px; width: auto; object-fit: contain; }
.rowIcon { width: 40px; height: 40px; border-radius: 12px; background: #eef1e5; display: flex; align-items: center; justify-content: center; color: #1f3a5a; font-size: 18px; }
#login {
  max-width: 400px;
  text-align: center;
}
#login .appLogo {
  height: 90px;
  display: block;
  margin: 4px auto 8px;
}
.loginTitle {
  font-size: 22px;
  font-weight: 700;
  color: #1f3a5a;
  margin: 0 0 4px;
}
.loginSub {
  color: #7a8496;
  font-size: 14px;
  margin: 0 0 22px;
}
.field {
  display: block;
  width: 100%;
  padding: 13px 15px;
  margin: 0 0 12px;
  border: 1px solid #d8d2c4;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  background: #faf8f3;
  color: #1f3a5a;
}
.field:focus {
  outline: none;
  border-color: #1f3a5a;
}
.btnPrimary {
  display: block;
  width: 100%;
  background: #1f3a5a;
  color: #f3ecd9;
  border: none;
  padding: 14px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 10px;
}
.btnPrimary:hover { background: #16293f; }
.btnSecondary {
  display: block;
  width: 100%;
  background: none;
  color: #1f3a5a;
  border: 1px solid #1f3a5a;
  padding: 13px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.btnSecondary:hover { background: #eef1e5; }
.authMsg {
  color: #a33;
  font-size: 14px;
  margin-top: 14px;
}
#planArea {
  background: transparent;
  box-shadow: none;
  padding: 0 4px;
  max-width: 440px;
}
.progress {
  background: #1f3a5a;
  color: #f3ecd9;
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 1em;
  margin: 8px 0 20px;
}
.progress strong { color: #e3b566; }
.drill {
  background: #fff;
  border-left: 0;
  border-radius: 14px;
}
#app {
  background: transparent;
  box-shadow: none;
  padding: 0 4px;
  max-width: 440px;
}
#app h2 {
  font-size: 22px;
  font-weight: 700;
}
#weaknesses label {
  background: #fff;
  border: 1px solid #ece4d2;
  border-radius: 12px;
}
#weaknesses label:hover {
  background: #faf8f3;
  border-color: #1f3a5a;
}
#weaknesses label:has(input:checked) {
  background: #eef1e5;
  border-color: #1f3a5a;
}
#saveBtn {
  background: #1f3a5a;
  color: #f3ecd9;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 16px;
}
#saveBtn:hover { background: #16293f; }
.streak {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fbe9d2;
  color: #a85d1a;
  padding: 8px 14px;
  border-radius: 99px;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 18px;
}
.forgotLink {
  display: inline-block;
  margin-top: 14px;
  color: #7a8496;
  font-size: 13px;
  text-decoration: none;
}
.forgotLink:hover { color: #1f3a5a; text-decoration: underline; }
.modeToggle { display: flex; gap: 8px; margin-bottom: 16px; }
.modeBtn {
  flex: 1;
  padding: 10px;
  border: 1px solid #1f3a5a;
  background: #fff;
  color: #1f3a5a;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.modeBtn.active {
  background: #1f3a5a;
  color: #f3ecd9;
}
.levelUp {
  background: #eef1e5;
  border: 1px solid #1f3a5a;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.levelUpText { color: #1f3a5a; font-weight: 600; font-size: 14px; }
.levelUpBtn {
  align-self: flex-start;
  background: #1f3a5a;
  color: #f3ecd9;
  border: none;
  padding: 10px 18px;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
}
.drillFeedback {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.fbBtn {
  background: none;
  border: 1px solid #d8d2c4;
  color: #7a8496;
  border-radius: 8px;
  padding: 4px 10px;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
}
.fbBtn:hover {
  border-color: #1f3a5a;
  color: #1f3a5a;
}
#landing {
  max-width: 440px;
  text-align: center;
  background: transparent;
  box-shadow: none;
}
#landing .appLogo { height: 100px; display: block; margin: 8px auto 12px; }
.landingTitle { font-size: 28px; font-weight: 700; color: #1f3a5a; margin: 0 0 8px; }
.landingSub { color: #7a8496; font-size: 15px; margin: 0 0 24px; }
.landingCta { max-width: 260px; margin: 0 auto 28px; }
.landingFeatures { text-align: left; margin: 0 auto 24px; max-width: 320px; }
.lf { display: flex; align-items: center; gap: 12px; color: #1f3a5a; font-size: 14px; margin-bottom: 14px; }
.lf i { color: #1f3a5a; width: 20px; text-align: center; }
.landingLogin { color: #7a8496; font-size: 13px; text-decoration: none; }
.landingLogin:hover { color: #1f3a5a; text-decoration: underline; }
#landing {
  max-width: 440px;
  text-align: center;
  background: transparent;
  box-shadow: none;
}
.brandRow { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 22px; }
.brandLogo { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.brandName { color: #1f3a5a; font-weight: 600; font-size: 15px; }
.landingTitle { font-size: 26px; font-weight: 700; color: #1f3a5a; line-height: 1.25; margin: 0 auto 10px; max-width: 300px; }
.landingSub { color: #7a8496; font-size: 15px; margin: 0 auto 24px; max-width: 280px; line-height: 1.5; }
.phone { width: 210px; margin: 0 auto 26px; background: #0f1c2e; border-radius: 26px; padding: 9px; }
.phoneScreen { background: #f3ecd9; border-radius: 19px; padding: 16px 14px; text-align: left; }
.pWelcome { color: #1f3a5a; font-weight: 600; font-size: 13px; margin-bottom: 10px; }
.pStreak { display: inline-flex; align-items: center; gap: 5px; background: #fbe9d2; color: #a85d1a; padding: 5px 10px; border-radius: 99px; font-size: 11px; font-weight: 600; margin-bottom: 10px; }
.pStat { background: #1f3a5a; border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.pStatLabel { color: #aeb9cc; font-size: 10px; }
.pStatNum { color: #f3ecd9; font-size: 20px; font-weight: 700; }
.pStatNum span { font-size: 11px; color: #9fb0c8; }
.pBar { height: 4px; background: #33517a; border-radius: 99px; margin-top: 6px; }
.pFill { width: 70%; height: 100%; background: #e3b566; border-radius: 99px; }
.pRow { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 10px; padding: 9px; }
.pRowIcon { width: 26px; height: 26px; border-radius: 8px; background: #eef1e5; display: flex; align-items: center; justify-content: center; color: #1f3a5a; font-size: 13px; }
.pRowText { color: #1f3a5a; font-size: 12px; font-weight: 600; }
.landingCta { max-width: 260px; margin: 0 auto 26px; }
.landingFeatures { text-align: left; margin: 0 auto 22px; max-width: 300px; }
.lf { display: flex; align-items: center; gap: 12px; color: #1f3a5a; font-size: 14px; margin-bottom: 14px; }
.lf i { color: #1f3a5a; width: 20px; text-align: center; }
.landingLogin { color: #7a8496; font-size: 13px; text-decoration: none; }
.landingLogin:hover { color: #1f3a5a; text-decoration: underline; }
#landing { max-width: 400px; }
.brandRow { margin-bottom: 16px; }
.landingTitle { font-size: 24px; margin-bottom: 8px; }
.landingSub { margin-bottom: 18px; }
.phone { width: 175px; margin-bottom: 20px; }
.landingCta { margin-bottom: 20px; }
.landingFeatures { margin-bottom: 16px; }
.lf { font-size: 13px; margin-bottom: 11px; }
#history { max-width: 440px; background: transparent; box-shadow: none; padding: 0 4px; }
.chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px;
  height: 150px;
  margin: 10px 0 8px;
}
.barCol { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; }
.barVal { font-size: 11px; color: #7a8496; margin-bottom: 4px; }
.barTrack { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.bar { width: 100%; background: #1f3a5a; border-radius: 6px 6px 0 0; min-height: 3px; }
.barLabel { font-size: 10px; color: #7a8496; margin-top: 6px; }
.chartNote { color: #7a8496; font-size: 13px; }
.footer {
  color: #a8b0bc;
  font-size: 12px;
  margin-top: 22px;
}
.doneItem { display: flex; align-items: center; gap: 8px; color: #1f3a5a; font-size: 13px; padding: 6px 0; }
.doneItem i { color: #2e7d32; }
.doneEmpty { color: #7a8496; font-size: 13px; }
.doneItem {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 8px;
  color: #1f3a5a;
  font-size: 14px;
  font-weight: 500;
}
.doneItem i { color: #2e7d32; }
.doneEmpty { color: #7a8496; font-size: 13px; }
.clearChat {
  display: block;
  margin: 0 0 8px auto;
  background: none;
  border: none;
  color: #7a8496;
  font-size: 13px;
  cursor: pointer;
}
.clearChat:hover { color: #1f3a5a; text-decoration: underline; }
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #1f3a5a;
  color: #f3ecd9;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  z-index: 10000;
}
.rowText { text-align: left; }
.statCard { text-align: left; }