:root {
  --primary: #e91e63;
  --primary-dark: #c2185b;
  --background: #fff7fa;
  --surface: #ffffff;
  --text: #29232a;
  --muted: #817781;
  --border: #f1dfe7;
  --soft-pink: #fde8f0;
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background: var(--background);
  color: var(--text);
  font-family: Arial, sans-serif;
  padding-bottom: 90px;
}

button {
  font: inherit;
  cursor: pointer;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: white;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.brand-icon {
  width: 43px;
  height: 43px;
  border-radius: 14px;
  background: var(--primary);
  color: white;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: bold;
}

.brand h1 {
  margin: 0;
  font-size: 19px;
}

.brand span {
  font-size: 11px;
  color: var(--muted);
}

.header-button {
  border: none;
  background: var(--soft-pink);
  border-radius: 12px;
  padding: 10px;
  font-size: 18px;
}

main {
  max-width: 650px;
  margin: auto;
  padding: 20px 16px;
}

.page {
  display: none;
  animation: fadeIn 0.25s ease;
}

.page.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.welcome-section {
  margin: 10px 0 22px;
}

.eyebrow {
  font-size: 10px;
  letter-spacing: 1.4px;
  color: var(--primary);
  font-weight: bold;
}

.welcome-section h2 {
  font-size: 27px;
  line-height: 1.25;
  margin: 9px 0;
}

.welcome-section p {
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 19px;
  margin-bottom: 17px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-heading h3 {
  margin: 6px 0;
}

.status-badge {
  background: var(--soft-pink);
  color: var(--primary-dark);
  padding: 7px 10px;
  border-radius: 20px;
  font-size: 10px;
}

.cycle-placeholder {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 25px 0;
}

.cycle-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 7px solid var(--soft-pink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cycle-circle span {
  font-size: 27px;
  font-weight: bold;
  color: var(--primary);
}

.cycle-circle small {
  font-size: 10px;
  color: var(--muted);
}

.cycle-details p {
  font-size: 12px;
  color: var(--muted);
}

.cycle-details h3 {
  font-size: 15px;
}

.primary-button {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: bold;
}

.primary-button:hover {
  background: var(--primary-dark);
}

.section-title {
  margin: 28px 0 15px;
}

.section-title h3 {
  margin-bottom: 5px;
}

.section-title p {
  color: var(--muted);
  font-size: 13px;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.feature-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 17px 13px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-height: 145px;
  color: var(--text);
}

.feature-card:active {
  transform: scale(0.98);
}

.feature-icon {
  font-size: 25px;
}

.feature-card strong {
  font-size: 13px;
}

.feature-card small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.info-card {
  background: var(--soft-pink);
  padding: 17px;
  border-radius: var(--radius);
  margin-top: 22px;
}

.info-card h3 {
  margin-top: 0;
  font-size: 15px;
}

.info-card p {
  font-size: 12px;
  line-height: 1.7;
  color: #704b5b;
}

.page-heading {
  margin: 15px 0 24px;
}

.page-heading h2 {
  font-size: 27px;
  margin: 8px 0;
}

.page-heading p {
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

.empty-state {
  text-align: center;
  padding: 35px 20px;
}

.empty-state > span {
  font-size: 40px;
}

.empty-state h3 {
  font-size: 17px;
}

.empty-state p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}

.feature-list div {
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.feature-list div:last-child {
  border-bottom: none;
}

.muted {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.premium-card {
  background: linear-gradient(145deg, #e91e63, #a91b62);
  color: white;
  padding: 23px;
  border-radius: 20px;
}

.premium-label {
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: bold;
}

.premium-card h3 {
  font-size: 22px;
  line-height: 1.4;
}

.premium-card p,
.premium-card li {
  font-size: 13px;
  line-height: 1.8;
}

.premium-card ul {
  padding-left: 20px;
}

.premium-note {
  border-top: 1px solid rgba(255,255,255,0.3);
  padding-top: 14px;
}

.shop-card h3 {
  font-size: 17px;
}

.shop-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.shop-card a {
  color: var(--primary);
  font-weight: bold;
  text-decoration: none;
  font-size: 13px;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 72px;
  background: white;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
  flex: 1;
  height: 100%;
  border: none;
  background: transparent;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-item span {
  font-size: 20px;
}

.nav-item small {
  font-size: 10px;
}

.nav-item.active {
  color: var(--primary);
  font-weight: bold;
}

@media (min-width: 700px) {
  main {
    padding-top: 30px;
  }

  .welcome-section h2 {
    font-size: 34px;
  }
}

/* PERIODWISE CYCLE TRACKER */

#cycleForm {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
}

#cycleForm label {
  font-weight: 600;
  font-size: 14px;
  color: #444;
}

#cycleForm input {
  width: 100%;
  padding: 14px;
  border: 1px solid #e5c5d2;
  border-radius: 10px;
  background: #fff;
  font-size: 16px;
  box-sizing: border-box;
}

#cycleForm input:focus {
  outline: 2px solid #e91e63;
  border-color: #e91e63;
}

#cycleForm .primary-button {
  margin-top: 10px;
}

#cycleMessage {
  font-size: 14px;
  color: #b01855;
  font-weight: 600;
}

.history-item {
  padding: 16px 0;
  border-bottom: 1px solid #f0dce4;
}

.history-item:last-child {
  border-bottom: none;
}

.history-item strong {
  display: block;
  color: #333;
  font-size: 16px;
}

.history-item p {
  color: #777;
  font-size: 14px;
  margin: 7px 0 12px;
}

.secondary-button {
  padding: 9px 16px;
  border: 1px solid #e91e63;
  border-radius: 8px;
  background: #fff;
  color: #e91e63;
  font-weight: 600;
  cursor: pointer;
}

.secondary-button:hover {
  background: #fff0f5;
}

#nextPeriodDisplay {
  color: #e91e63;
  margin: 10px 0 20px;
}

#fertileWindowDisplay {
  color: #16865b;
  font-weight: 600;
  margin-top: 8px;
}

#cycle .card {
  margin-bottom: 20px;
}
