:root {
  --ink: #523d45;
  --muted: #a18891;
  --rose: #ee8fa8;
  --rose-deep: #df6f8f;
  --rose-soft: #f9dce4;
  --peach: #ffe1c9;
  --cream: #fffaf8;
  --paper: rgba(255, 255, 255, 0.86);
  --lavender: #eee7f7;
  --mint: #e5f3e8;
  --line: rgba(125, 84, 96, 0.11);
  --shadow: 0 18px 50px rgba(139, 86, 101, 0.14);
  --shadow-soft: 0 9px 24px rgba(139, 86, 101, 0.09);
  --round-xl: 30px;
  --round-lg: 23px;
  --round-md: 17px;
  --nav-height: 78px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: #f7e9ec;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  background:
    radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.88), transparent 26%),
    linear-gradient(135deg, #fbf0f2 0%, #f7e5e9 55%, #f1e7f2 100%);
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  color: inherit;
}

button,
label,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
  cursor: pointer;
}

.ambient {
  position: fixed;
  border-radius: 50%;
  filter: blur(1px);
  pointer-events: none;
}

.ambient-one {
  width: 38vw;
  height: 38vw;
  left: -14vw;
  top: -14vw;
  background: rgba(255, 255, 255, 0.55);
}

.ambient-two {
  width: 28vw;
  height: 28vw;
  right: -8vw;
  bottom: -9vw;
  background: rgba(231, 206, 235, 0.4);
}

.phone-shell {
  position: relative;
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 250, 249, 0.97), rgba(255, 248, 249, 0.98)),
    var(--cream);
  box-shadow: 0 0 80px rgba(107, 69, 82, 0.18);
}

.app {
  position: relative;
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  padding: max(10px, env(safe-area-inset-top)) 18px 8px;
  background: rgba(255, 250, 249, 0.82);
  backdrop-filter: blur(18px);
}

.icon-button {
  display: grid;
  width: 39px;
  height: 39px;
  padding: 10px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  transition: transform 160ms ease, background 160ms ease;
}

.icon-button:active {
  transform: scale(0.92);
  background: var(--rose-soft);
}

.icon-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.space-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 999px;
  background: transparent;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.mini-bow {
  position: relative;
  width: 15px;
  height: 9px;
  transform: rotate(-6deg);
}

.mini-bow::before,
.mini-bow::after {
  position: absolute;
  top: 1px;
  width: 8px;
  height: 8px;
  content: "";
  border: 1.2px solid #de8aa2;
  border-radius: 50% 50% 45% 45%;
  background: #fae3e9;
}

.mini-bow::before {
  left: 0;
  transform: rotate(20deg);
}

.mini-bow::after {
  right: 0;
  transform: rotate(-20deg);
}

.mini-bow-right {
  transform: rotate(8deg) scale(0.88);
}

.view-stack {
  padding-bottom: calc(var(--nav-height) + 24px);
}

.view {
  display: none;
  padding: 6px 20px 24px;
  animation: viewIn 280ms ease both;
}

.view.is-active {
  display: block;
}

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

.hero-card {
  position: relative;
  min-height: 268px;
  padding: 28px 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--round-xl);
  background:
    radial-gradient(circle at 85% 16%, rgba(255, 255, 255, 0.95), transparent 30%),
    linear-gradient(135deg, #fce8ec 0%, #f8d7e0 52%, #fde6db 100%);
  box-shadow: var(--shadow);
}

.hero-card::before {
  position: absolute;
  right: -20px;
  bottom: -55px;
  width: 250px;
  height: 180px;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  transform: rotate(-14deg);
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow,
.section-kicker {
  margin: 0;
  color: var(--rose-deep);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.eyebrow {
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}

.hero-card h1 {
  margin: 0;
  max-width: 220px;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: clamp(34px, 9vw, 45px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.hero-card h1 span {
  position: relative;
  z-index: 1;
}

.hero-card h1 span::after {
  position: absolute;
  right: -4px;
  bottom: 3px;
  left: -3px;
  z-index: -1;
  height: 10px;
  content: "";
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.58);
  transform: rotate(-2deg);
}

.days-together {
  display: flex;
  align-items: baseline;
  gap: 5px;
  width: fit-content;
  margin-top: 20px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  font-size: 11px;
}

.days-together strong {
  color: var(--rose-deep);
  font-family: "Georgia", serif;
  font-size: 19px;
}

.cloud-bunny {
  position: absolute;
  right: -8px;
  bottom: -28px;
  width: 215px;
  filter: drop-shadow(0 12px 18px rgba(151, 87, 104, 0.12));
  animation: float 4.2s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(0);
  }
  50% {
    transform: translateY(-7px) rotate(1deg);
  }
}

.sparkle {
  position: absolute;
  z-index: 2;
  color: #fff;
  font-size: 21px;
  animation: twinkle 2.8s ease-in-out infinite;
}

.sparkle-one {
  top: 29px;
  right: 38px;
}

.sparkle-two {
  top: 91px;
  right: 13px;
  animation-delay: -1.2s;
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

.section-block {
  margin-top: 28px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.section-heading h2,
.page-heading h1,
.calendar-header h2,
.modal-heading h2 {
  margin: 3px 0 0;
  font-family: "STKaiti", "KaiTi", "Microsoft YaHei UI", sans-serif;
  font-size: 21px;
  line-height: 1.25;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 0;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  white-space: nowrap;
}

.text-button span {
  color: var(--rose-deep);
  font-size: 17px;
  line-height: 1;
}

.task-preview-list {
  display: grid;
  gap: 10px;
}

.task-preview,
.task-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--round-md);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.task-check {
  position: relative;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  margin: 1px 0 0;
  border: 1.7px solid #e8a9b8;
  border-radius: 50%;
  background: #fff;
  appearance: none;
}

.task-check::after {
  position: absolute;
  top: 4px;
  left: 7px;
  width: 6px;
  height: 10px;
  content: "";
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  opacity: 0;
  transform: rotate(42deg);
}

.task-check:checked {
  border-color: var(--rose);
  background: var(--rose);
}

.task-check:checked::after {
  opacity: 1;
}

.task-main {
  min-width: 0;
  flex: 1;
}

.task-main strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.task-main small {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.task-item.is-done .task-main strong {
  color: #b7a9ad;
  text-decoration: line-through;
}

.priority-tag {
  display: inline-flex;
  align-items: center;
  margin-top: 7px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
}

.priority-tag.important {
  color: #c86780;
  background: #fde1e7;
}

.priority-tag.urgent {
  color: #9a7b32;
  background: #fff2c7;
}

.task-delete {
  flex: 0 0 auto;
  padding: 3px;
  color: #c6b9bd;
  background: transparent;
  font-size: 19px;
  line-height: 1;
}

.feature-card {
  display: flex;
  min-height: 160px;
  padding: 17px;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  border-radius: var(--round-lg);
  box-shadow: var(--shadow-soft);
  transition: transform 160ms ease;
}

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

.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.install-banner {
  display: flex;
  width: 100%;
  margin-top: 12px;
  padding: 11px 12px;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(230, 139, 161, 0.15);
  border-radius: 17px;
  text-align: left;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(252, 234, 240, 0.88));
  box-shadow: 0 7px 20px rgba(139, 86, 101, 0.07);
}

.install-banner-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(145deg, #f19db2, #e57d9a);
  font-size: 20px;
}

.install-banner > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.install-banner strong {
  display: block;
  font-size: 11px;
}

.install-banner small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.install-banner > b {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 99px;
  color: var(--rose-deep);
  background: #fff;
  font-size: 9px;
}

.meal-highlight {
  background: linear-gradient(145deg, #fff8ed, #ffe5d2);
}

.cycle-highlight {
  background: linear-gradient(145deg, #f7f2fb, #ece3f6);
}

.feature-icon {
  display: grid;
  width: 39px;
  height: 39px;
  margin-bottom: auto;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
  font-size: 20px;
}

.feature-label {
  margin-top: 14px;
  color: var(--muted);
  font-size: 11px;
}

.feature-card strong {
  margin-top: 2px;
  font-family: "Georgia", "STKaiti", serif;
  font-size: 22px;
  line-height: 1.2;
}

.feature-card strong small {
  font-family: "Microsoft YaHei UI", sans-serif;
  font-size: 10px;
  font-weight: 500;
}

.feature-note {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.mood-preview {
  padding: 18px;
  border-radius: var(--round-lg);
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.8), transparent 35%),
    linear-gradient(135deg, #fff9f8, #fceff2);
  box-shadow: var(--shadow-soft);
}

.mood-preview-content {
  display: flex;
  align-items: center;
  gap: 13px;
}

.mood-preview-emoji {
  display: grid;
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 18px;
  background: #fff;
  font-size: 25px;
  box-shadow: 0 7px 18px rgba(146, 95, 112, 0.09);
}

.mood-preview-copy {
  min-width: 0;
}

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

.mood-preview-copy strong {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  font-weight: 600;
}

.mood-preview-copy p {
  margin: 4px 0 0;
  color: #7c656c;
  font-size: 12px;
  line-height: 1.5;
}

.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 21px 1px 20px;
}

.page-heading h1 {
  margin-top: 5px;
  font-size: 32px;
}

.page-heading p:not(.section-kicker) {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.round-add {
  display: grid;
  width: 47px;
  height: 47px;
  flex: 0 0 auto;
  margin-top: 7px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #f19db2, #e57d9a);
  box-shadow: 0 9px 20px rgba(223, 111, 143, 0.28);
  font-size: 25px;
  font-weight: 300;
  transition: transform 160ms ease;
}

.round-add:active {
  transform: rotate(8deg) scale(0.92);
}

.summary-strip {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border-radius: var(--round-lg);
  background: linear-gradient(135deg, #f9e2e8, #fff4ee);
  box-shadow: var(--shadow-soft);
}

.summary-orb {
  display: grid;
  width: 66px;
  height: 66px;
  flex: 0 0 auto;
  place-content: center;
  text-align: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
}

.summary-orb span {
  color: var(--muted);
  font-size: 9px;
}

.summary-orb strong {
  margin-top: 2px;
  font-family: "Georgia", serif;
  font-size: 18px;
}

.summary-progress {
  flex: 1;
}

.summary-progress-copy {
  display: flex;
  justify-content: space-between;
  margin-bottom: 9px;
  color: #7c656c;
  font-size: 11px;
}

.summary-progress-copy strong {
  color: var(--rose-deep);
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.7);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f4a8bb, #ec819f);
  transition: width 400ms ease;
}

.filter-row {
  display: flex;
  gap: 7px;
  margin: 22px 0 12px;
}

.filter-chip {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--muted);
  font-size: 11px;
  transition: 160ms ease;
}

.filter-chip.is-active {
  border-color: transparent;
  color: #fff;
  background: var(--rose);
  box-shadow: 0 6px 14px rgba(238, 143, 168, 0.25);
}

.task-list {
  display: grid;
  gap: 10px;
}

.task-item {
  padding: 16px;
  align-items: flex-start;
}

.task-item .task-main strong {
  padding-right: 10px;
}

.empty-state {
  padding: 35px 20px;
  text-align: center;
  border: 1px dashed rgba(169, 135, 146, 0.2);
  border-radius: var(--round-lg);
  background: rgba(255, 255, 255, 0.38);
}

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

.empty-state h3 {
  margin: 9px 0 4px;
  font-size: 14px;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.calorie-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px;
  border-radius: var(--round-xl);
  background:
    radial-gradient(circle at 90% 5%, rgba(255, 255, 255, 0.8), transparent 35%),
    linear-gradient(135deg, #fff0dc, #ffe1d2);
  box-shadow: var(--shadow-soft);
}

.calorie-ring {
  --value: 0;
  display: grid;
  width: 108px;
  height: 108px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--rose-deep) calc(var(--value) * 1%), rgba(255, 255, 255, 0.65) 0);
}

.calorie-ring::before {
  position: absolute;
  width: 84px;
  height: 84px;
  content: "";
  border-radius: 50%;
  background: #fff8f3;
}

.calorie-ring > div {
  position: relative;
  z-index: 1;
  display: grid;
  text-align: center;
}

.calorie-ring strong {
  font-family: "Georgia", serif;
  font-size: 23px;
}

.calorie-ring span {
  color: var(--muted);
  font-size: 9px;
}

.calorie-copy {
  min-width: 0;
}

.calorie-copy > span {
  color: #a8867a;
  font-size: 11px;
}

.calorie-copy strong {
  display: block;
  margin-top: 3px;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 20px;
}

.calorie-copy p {
  margin: 7px 0 0;
  color: #997e73;
  font-size: 10px;
}

.meal-macros {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 11px;
}

.meal-macros div {
  display: flex;
  padding: 11px 9px;
  flex-direction: column;
  gap: 3px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.65);
  box-shadow: 0 5px 14px rgba(127, 91, 102, 0.05);
}

.meal-macros span {
  color: var(--muted);
  font-size: 9px;
}

.meal-macros strong {
  font-family: "Georgia", serif;
  font-size: 18px;
}

.compact-heading {
  align-items: center;
  margin: 27px 0 13px;
}

.meal-list {
  display: grid;
  gap: 14px;
}

.meal-card {
  overflow: hidden;
  border-radius: var(--round-lg);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-soft);
}

.meal-photo {
  position: relative;
  display: grid;
  width: 100%;
  height: 170px;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #fae7df, #f6d7dc);
}

.meal-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.meal-photo-placeholder {
  font-size: 53px;
  filter: drop-shadow(0 8px 12px rgba(97, 62, 72, 0.12));
}

.meal-type-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(9px);
  font-size: 10px;
  font-weight: 700;
}

.entry-delete {
  position: absolute;
  top: 11px;
  right: 11px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  color: #9d7d86;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 4px 12px rgba(102, 68, 78, 0.1);
  backdrop-filter: blur(9px);
  font-size: 19px;
  line-height: 1;
}

.entry-delete:active {
  color: var(--rose-deep);
  background: #fff;
  transform: scale(0.93);
}

.meal-card-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px;
}

.meal-card-copy {
  min-width: 0;
}

.meal-card-copy strong {
  display: block;
  font-size: 14px;
}

.meal-card-copy p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.meal-kcal {
  flex: 0 0 auto;
  text-align: right;
}

.meal-kcal strong {
  font-family: "Georgia", serif;
  font-size: 20px;
}

.meal-kcal span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.calendar-card {
  padding: 18px 14px 15px;
  border-radius: var(--round-xl);
  background:
    radial-gradient(circle at 80% 21%, rgba(253, 235, 240, 0.75), transparent 33%),
    rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-soft);
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1px 3px 16px;
}

.calendar-header > div {
  text-align: center;
}

.calendar-header h2 {
  font-family: "Microsoft YaHei UI", sans-serif;
  font-size: 16px;
}

.calendar-header p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.calendar-nav {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 50%;
  color: var(--rose-deep);
  background: #fdf2f4;
  font-family: Georgia, serif;
  font-size: 22px;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.calendar-weekdays {
  margin-bottom: 5px;
}

.calendar-weekdays span {
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}

.calendar-grid {
  row-gap: 4px;
}

.calendar-day {
  position: relative;
  display: grid;
  width: 36px;
  height: 36px;
  margin: auto;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  font-family: "Georgia", "Microsoft YaHei UI", serif;
  font-size: 12px;
}

.calendar-day.is-outside {
  color: #d7cccf;
}

.calendar-day.is-today {
  color: var(--rose-deep);
  box-shadow: inset 0 0 0 1.5px var(--rose);
  font-weight: 700;
}

.calendar-day.is-period {
  color: #fff;
  background: #eb93a9;
}

.calendar-day.is-period.is-today {
  box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--rose-deep);
}

.calendar-day.is-predicted {
  color: #bf7e90;
  background: #fbe4ea;
}

.calendar-day.has-symptom::after {
  position: absolute;
  bottom: 3px;
  width: 3px;
  height: 3px;
  content: "";
  border-radius: 50%;
  background: #c68b4e;
}

.calendar-day.is-period.has-symptom::after {
  background: #fff;
}

.calendar-legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.calendar-legend span {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 9px;
}

.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.legend-dot.period {
  background: #eb93a9;
}

.legend-dot.predicted {
  background: #fbe4ea;
}

.legend-dot.symptom {
  background: #c68b4e;
}

.cycle-status {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 13px;
  padding: 16px;
  border-radius: var(--round-lg);
  background: linear-gradient(135deg, #f2edf8, #f9eef2);
  box-shadow: var(--shadow-soft);
}

.cycle-moon {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 21px;
}

.cycle-status span {
  color: var(--muted);
  font-size: 9px;
}

.cycle-status strong {
  display: block;
  margin-top: 2px;
  font-size: 13px;
}

.cycle-status p {
  margin: 4px 0 0;
  color: #8f7980;
  font-size: 10px;
  line-height: 1.45;
}

.gentle-card {
  margin-top: 13px;
  padding: 17px;
  border-radius: var(--round-lg);
  background: rgba(255, 255, 255, 0.75);
  box-shadow: var(--shadow-soft);
}

.tiny-heart {
  color: var(--rose);
  font-family: Georgia, serif;
  font-size: 28px;
}

.tips-list {
  display: grid;
  gap: 10px;
}

.tip-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #79636b;
  font-size: 11px;
  line-height: 1.55;
}

.tip-item span {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  background: #fbeef1;
  font-size: 12px;
}

.period-history {
  display: grid;
  gap: 9px;
}

.history-item {
  padding: 15px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 5px 15px rgba(126, 88, 99, 0.05);
}

.history-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.history-top strong {
  font-size: 13px;
}

.history-top span {
  color: var(--rose-deep);
  font-size: 9px;
}

.history-item p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.floating-heart {
  margin-top: 7px;
  color: var(--rose);
  font-family: Georgia, serif;
  font-size: 43px;
  transform: rotate(-12deg);
}

.mood-composer {
  padding: 19px;
  border-radius: var(--round-xl);
  background:
    radial-gradient(circle at 91% 6%, rgba(255, 255, 255, 0.85), transparent 30%),
    linear-gradient(135deg, #fde9ed, #f8eaf5);
  box-shadow: var(--shadow-soft);
}

.mood-composer > p {
  margin: 0 0 14px;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 19px;
  font-weight: 700;
}

.mood-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mood-option {
  position: relative;
  display: flex;
  padding: 10px 7px;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border: 1px solid transparent;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.56);
  font-size: 10px;
  transition: 160ms ease;
}

.mood-option span {
  font-size: 21px;
}

.mood-option.is-selected {
  border-color: rgba(228, 122, 149, 0.32);
  background: #fff;
  box-shadow: 0 7px 16px rgba(155, 96, 113, 0.1);
  transform: translateY(-2px);
}

.text-area-wrap {
  position: relative;
  display: block;
  margin-top: 13px;
}

.text-area-wrap textarea {
  width: 100%;
  min-height: 94px;
  padding: 13px 13px 25px;
  resize: none;
  border: 1px solid rgba(255, 255, 255, 0.9);
  outline: 0;
  border-radius: 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.66);
  font-size: 12px;
  line-height: 1.6;
}

.text-area-wrap textarea:focus {
  box-shadow: 0 0 0 3px rgba(238, 143, 168, 0.14);
}

.text-area-wrap > span {
  position: absolute;
  right: 12px;
  bottom: 10px;
  color: var(--muted);
  font-size: 8px;
}

.mood-photo-field {
  position: relative;
  margin-top: 10px;
}

.mood-photo-picker {
  display: grid;
  min-height: 54px;
  overflow: hidden;
  place-items: center;
  border: 1px dashed rgba(223, 111, 143, 0.35);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
}

.mood-photo-picker.has-photo {
  min-height: 180px;
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.9);
  background: #f8e8ec;
}

.mood-photo-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.mood-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #9b777f;
  font-size: 10px;
}

.mood-photo-placeholder b {
  font-size: 19px;
}

.mood-photo-placeholder small {
  margin-left: 2px;
  color: #b6a2a8;
  font-size: 8px;
}

.mood-photo-picker > img {
  width: 100%;
  height: 190px;
  object-fit: cover;
}

.mood-photo-remove {
  position: absolute;
  top: 9px;
  right: 9px;
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 50%;
  color: #8f747c;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 12px rgba(102, 68, 78, 0.12);
  font-size: 18px;
  line-height: 1;
}

.primary-button,
.secondary-button {
  width: 100%;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.mood-composer .primary-button {
  margin-top: 12px;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, #f09ab0, #df718f);
  box-shadow: 0 9px 20px rgba(218, 107, 138, 0.24);
}

.primary-button:active {
  transform: scale(0.985);
}

.secondary-button {
  margin-top: 9px;
  color: var(--muted);
  background: #f7f0f1;
}

.install-settings-button {
  display: flex;
  width: 100%;
  min-height: 45px;
  margin-top: 9px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #f0d8df;
  border-radius: 15px;
  color: var(--rose-deep);
  background: #fff3f6;
  font-size: 11px;
  font-weight: 700;
}

.install-hint {
  margin: 9px 2px 0;
  padding: 10px 12px;
  border-radius: 12px;
  color: #8e747c;
  background: #faf1f3;
  font-size: 9px;
  line-height: 1.65;
}

.mood-feed {
  display: grid;
  gap: 11px;
}

.mood-post {
  padding: 16px;
  border-radius: var(--round-lg);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow-soft);
}

.mood-post-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  display: grid;
  width: 37px;
  height: 37px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(145deg, #fce3e9, #f5cbd6);
  font-size: 18px;
}

.avatar.partner {
  background: linear-gradient(145deg, #e8e1f4, #d9d2ec);
}

.mood-post-author {
  flex: 1;
}

.mood-post-author strong {
  display: block;
  font-size: 12px;
}

.mood-post-author span {
  color: var(--muted);
  font-size: 9px;
}

.post-mood {
  padding: 5px 9px;
  border-radius: 99px;
  background: #fbeef1;
  color: var(--rose-deep);
  font-size: 10px;
}

.mood-post p {
  margin: 11px 0 0;
  color: #6f5960;
  font-size: 12px;
  line-height: 1.65;
}

.mood-post-photo {
  margin-top: 11px;
  overflow: hidden;
  border-radius: 16px;
  background: #f7e5ea;
}

.mood-post-photo img {
  display: block;
  width: 100%;
  max-height: 300px;
  object-fit: cover;
}

.mood-post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 9px;
}

.mood-delete {
  padding: 4px 0 0;
  color: #b29fa5;
  background: transparent;
  font-size: 9px;
}

.mood-delete:active {
  color: var(--rose-deep);
}

.heart-button {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0 0;
  color: var(--muted);
  background: transparent;
  font-family: Georgia, serif;
  font-size: 15px;
}

.heart-button.is-liked {
  color: var(--rose-deep);
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: min(100%, 480px);
  min-height: calc(var(--nav-height) + env(safe-area-inset-bottom));
  margin: 0 auto;
  padding: 10px 10px max(11px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(121, 84, 96, 0.08);
  background: rgba(255, 251, 250, 0.92);
  backdrop-filter: blur(22px);
}

.nav-item {
  position: relative;
  display: flex;
  padding: 5px 2px;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #9d898f;
  background: transparent;
  font-size: 9px;
  transition: color 170ms ease, transform 170ms ease;
}

.nav-item svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item::before {
  position: absolute;
  top: -10px;
  width: 22px;
  height: 3px;
  content: "";
  border-radius: 99px;
  background: transparent;
}

.nav-item.is-active {
  color: var(--rose-deep);
  transform: translateY(-1px);
}

.nav-item.is-active::before {
  background: var(--rose);
}

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px 0 0;
}

.modal-layer[hidden],
.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(70, 45, 53, 0.28);
  backdrop-filter: blur(4px);
  animation: fadeIn 180ms ease both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
}

.modal {
  position: relative;
  width: min(100%, 480px);
  max-height: calc(100vh - 16px);
  padding: 14px 21px calc(24px + env(safe-area-inset-bottom));
  overflow-y: auto;
  border-radius: 28px 28px 0 0;
  background: #fffbfa;
  box-shadow: 0 -15px 60px rgba(78, 48, 57, 0.18);
  animation: sheetIn 260ms cubic-bezier(0.22, 0.75, 0.3, 1) both;
}

@keyframes sheetIn {
  from {
    opacity: 0;
    transform: translateY(35px);
  }
}

.modal-handle {
  width: 37px;
  height: 4px;
  margin: 0 auto 17px;
  border-radius: 99px;
  background: #e5dade;
}

.modal-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.modal-heading h2 {
  font-size: 24px;
}

.modal-close {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  background: #f8f0f2;
  font-size: 22px;
  line-height: 1;
}

.field,
fieldset.field {
  display: block;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
}

.cloud-connection-card {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid #ecdfe3;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff7f8, #f9edf1);
}

.cloud-connection-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  background: #fff;
  font-size: 19px;
  box-shadow: 0 5px 12px rgba(124, 82, 95, 0.07);
}

.cloud-connection-copy {
  min-width: 0;
  flex: 1;
}

.cloud-connection-copy small {
  display: block;
  color: var(--muted);
  font-size: 8px;
}

.cloud-connection-copy strong {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cloud-connection-copy em {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: #a38b93;
  font-size: 8px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cloud-connection-card.is-connected {
  border-color: rgba(118, 173, 134, 0.24);
  background: linear-gradient(135deg, #f5fbf6, #edf7f0);
}

.cloud-setup-button {
  flex: 0 0 auto;
  padding: 7px 11px;
  border-radius: 99px;
  color: var(--rose-deep);
  background: #fff;
  font-size: 9px;
  font-weight: 700;
}

.field > span,
.field legend {
  display: block;
  margin: 0 0 7px 2px;
  color: #806b72;
  font-size: 11px;
  font-weight: 600;
}

.field input:not([type="radio"]):not([type="checkbox"]),
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid #eee1e5;
  outline: 0;
  border-radius: 13px;
  color: var(--ink);
  background: #fff;
  font-size: 12px;
}

.field textarea {
  min-height: 86px;
  resize: vertical;
  line-height: 1.6;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #efa4b6;
  box-shadow: 0 0 0 3px rgba(238, 143, 168, 0.11);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.priority-options,
.symptom-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.priority-options input,
.symptom-options input,
.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.priority-options label span,
.symptom-options label span,
.segmented label span {
  display: block;
  padding: 8px 12px;
  border: 1px solid #eee1e5;
  border-radius: 99px;
  color: var(--muted);
  background: #fff;
  font-size: 10px;
}

.priority-options input:checked + span,
.symptom-options input:checked + span,
.segmented input:checked + span {
  border-color: #f0a1b5;
  color: var(--rose-deep);
  background: #fdf0f3;
}

.switch-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 4px 0 17px;
  padding: 13px;
  border-radius: 14px;
  background: #f9f3f4;
}

.switch-row > span {
  flex: 1;
}

.switch-row strong {
  display: block;
  font-size: 11px;
}

.switch-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.switch-row input {
  position: absolute;
  opacity: 0;
}

.switch-row i {
  position: relative;
  width: 39px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 99px;
  background: #d9ccd0;
  transition: background 160ms ease;
}

.switch-row i::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  content: "";
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(86, 57, 66, 0.18);
  transition: transform 160ms ease;
}

.switch-row input:checked + i {
  background: var(--rose);
}

.switch-row input:checked + i::after {
  transform: translateX(17px);
}

.photo-upload {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 165px;
  margin-bottom: 16px;
  overflow: hidden;
  place-items: center;
  border: 1.5px dashed #edbec9;
  border-radius: 19px;
  background:
    radial-gradient(circle at 85% 10%, rgba(255, 255, 255, 0.9), transparent 28%),
    linear-gradient(145deg, #fdf3ef, #fbe9ee);
}

.photo-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.photo-upload img {
  width: 100%;
  height: 190px;
  object-fit: cover;
}

.upload-placeholder {
  display: grid;
  justify-items: center;
  gap: 4px;
}

.upload-placeholder b {
  font-size: 29px;
}

.upload-placeholder strong {
  font-size: 12px;
}

.upload-placeholder small {
  color: var(--muted);
  font-size: 9px;
}

.food-rows {
  display: grid;
  gap: 8px;
}

.food-row {
  display: grid;
  grid-template-columns: 1fr 74px 25px;
  gap: 6px;
  align-items: center;
}

.food-row select,
.food-row input {
  min-height: 40px !important;
  padding: 9px !important;
}

.remove-food {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  color: #bdaeb2;
  background: #f7edef;
  font-size: 16px;
}

.add-food-button {
  margin-top: 8px;
  color: var(--rose-deep);
}

.calorie-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 3px 0 8px;
  padding: 13px;
  border-radius: 14px;
  background: #fff1e9;
}

.calorie-total span {
  color: #967b71;
  font-size: 10px;
}

.calorie-total strong {
  color: #8c626e;
  font-family: Georgia, serif;
  font-size: 14px;
}

.calorie-total strong b {
  color: var(--rose-deep);
  font-size: 20px;
}

.form-note,
.privacy-note {
  margin: 8px 0 14px;
  color: #ab9a9f;
  font-size: 9px;
  line-height: 1.55;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.segmented label span {
  padding: 10px 5px;
  text-align: center;
}

.pair-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-bottom: 18px;
  padding: 4px;
  border-radius: 14px;
  background: #f7eef1;
}

.pair-tabs button {
  padding: 9px 7px;
  border-radius: 11px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
}

.pair-tabs button.is-active {
  color: var(--rose-deep);
  background: #fff;
  box-shadow: 0 4px 12px rgba(126, 81, 95, 0.08);
  font-weight: 700;
}

.pair-caption,
.pair-powered {
  margin: -2px 1px 14px;
  color: #a18a92;
  font-size: 9px;
  line-height: 1.65;
}

.pair-powered {
  margin: 14px 0 0;
  text-align: center;
}

.invite-code-input {
  font-family: Georgia, "Microsoft YaHei UI", sans-serif;
  font-size: 22px !important;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-align: center;
}

.pair-success {
  padding: 8px 2px 2px;
  text-align: center;
}

.pair-success > span {
  font-size: 32px;
}

.pair-success h3 {
  margin: 7px 0 5px;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 21px;
}

.pair-success p {
  margin: 0 auto 13px;
  max-width: 290px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.pair-code {
  display: block;
  margin: 0 auto 14px;
  color: var(--rose-deep);
  font-family: Georgia, serif;
  font-size: 35px;
  letter-spacing: 0.18em;
}

.pair-code + .primary-button {
  margin-bottom: 9px;
}

.pair-done-button {
  padding: 10px 16px;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
}

.input-suffix {
  position: relative;
}

.input-suffix input {
  padding-right: 31px !important;
}

.input-suffix b {
  position: absolute;
  top: 50%;
  right: 12px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
  transform: translateY(-50%);
}

.privacy-note {
  margin: 13px 0 0;
  text-align: center;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: calc(var(--nav-height) + 25px);
  left: 20px;
  z-index: 200;
  width: fit-content;
  max-width: min(400px, calc(100vw - 40px));
  margin: auto;
  padding: 11px 16px;
  border-radius: 99px;
  color: #fff;
  background: rgba(82, 61, 69, 0.92);
  box-shadow: 0 10px 30px rgba(66, 43, 51, 0.25);
  font-size: 11px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: 200ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 900px) {
  body {
    padding: 24px 0;
  }

  .phone-shell {
    min-height: calc(100vh - 48px);
    border: 7px solid rgba(255, 255, 255, 0.72);
    border-radius: 42px;
    box-shadow: 0 35px 90px rgba(100, 62, 76, 0.22);
  }

  .app {
    min-height: calc(100vh - 62px);
  }

  .topbar {
    border-radius: 35px 35px 0 0;
  }

  .bottom-nav {
    bottom: 31px;
    border-radius: 0 0 35px 35px;
  }

  .modal-layer {
    padding-bottom: 31px;
  }

  .modal {
    max-height: calc(100vh - 54px);
    border-radius: 28px;
  }
}

@media (max-width: 360px) {
  .view {
    padding-right: 15px;
    padding-left: 15px;
  }

  .hero-card {
    min-height: 255px;
  }

  .cloud-bunny {
    width: 190px;
  }

  .feature-card {
    min-height: 152px;
  }

  .calendar-day {
    width: 33px;
    height: 33px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
