:root {
  --ink: #4c3542;
  --muted: #856d79;
  --pink-50: #fff8fb;
  --pink-100: #ffeef5;
  --pink-200: #ffd8e8;
  --pink-300: #f7b9d1;
  --pink-400: #e98caf;
  --pink-500: #d96898;
  --purple-100: #eee6ff;
  --purple-300: #c7b0e8;
  --blue-100: #e8f4ff;
  --cream: #fff7e8;
  --glass: rgba(255, 250, 253, 0.76);
  --glass-strong: rgba(255, 252, 254, 0.9);
  --line: rgba(255, 255, 255, 0.72);
  --shadow: 0 20px 55px rgba(118, 61, 90, 0.14);
  --shadow-soft: 0 10px 30px rgba(146, 78, 112, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: #ecdbe2;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: #ecdbe2;
  font-family: "HarmonyOS Sans SC", "MiSans", "PingFang SC", "Microsoft YaHei", ui-rounded, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

button {
  color: inherit;
}

.app-shell {
  min-height: 100vh;
}

.background-photo,
.background-overlay {
  position: fixed;
  inset: -30px;
  pointer-events: none;
}

.background-photo {
  z-index: -3;
  background: url("./assets/cat-background.jpg") center / cover no-repeat;
  filter: blur(21px) brightness(0.62) saturate(0.72);
  transform: scale(1.08);
}

.background-overlay {
  z-index: -2;
  background:
    radial-gradient(circle at 74% 18%, rgba(255, 236, 250, 0.44), transparent 32%),
    linear-gradient(145deg, rgba(235, 142, 182, 0.33), rgba(202, 167, 226, 0.24) 48%, rgba(255, 209, 226, 0.31));
}

.glass-card {
  border: 1px solid var(--line);
  background: var(--glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(23px) saturate(1.2);
  -webkit-backdrop-filter: blur(23px) saturate(1.2);
}

.sidebar {
  position: fixed;
  z-index: 20;
  top: 22px;
  bottom: 22px;
  left: 22px;
  width: 232px;
  display: flex;
  flex-direction: column;
  padding: 22px 16px 16px;
  border-radius: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 15px;
  color: white;
  background: linear-gradient(145deg, #f4a5c3, #d47da4);
  box-shadow: 0 9px 20px rgba(215, 111, 154, 0.3), inset 0 1px rgba(255, 255, 255, 0.65);
  font-size: 20px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  color: #5f3c4d;
  font-size: 15px;
  letter-spacing: 0.02em;
}

.brand small {
  margin-top: 3px;
  color: #ab8799;
  font-size: 8px;
  letter-spacing: 0.11em;
}

.sidebar nav {
  display: grid;
  gap: 8px;
  margin-top: 34px;
}

.sidebar nav button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 48px;
  padding: 0 15px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  color: #826776;
  cursor: pointer;
  transition: 180ms ease;
}

.sidebar nav button:hover {
  border-color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.48);
  transform: translateX(2px);
}

.sidebar nav button.active {
  border-color: rgba(255, 255, 255, 0.88);
  color: #a84270;
  background: linear-gradient(110deg, rgba(255, 238, 247, 0.95), rgba(255, 255, 255, 0.7));
  box-shadow: 0 10px 24px rgba(174, 81, 125, 0.13);
}

.sidebar nav button span {
  display: grid;
  place-items: center;
  width: 24px;
  color: #cc7098;
  font-size: 18px;
}

.sidebar nav button b {
  font-size: 14px;
  font-weight: 650;
}

.sidebar nav button i {
  position: absolute;
  right: 9px;
  width: 4px;
  height: 22px;
  border-radius: 9px;
  background: transparent;
}

.sidebar nav button.active i {
  background: linear-gradient(#ee91b6, #c383c9);
}

.sidebar-note {
  margin-top: auto;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  color: #9b6d82;
  background: linear-gradient(145deg, rgba(255, 244, 249, 0.8), rgba(244, 234, 255, 0.62));
  box-shadow: var(--shadow-soft);
}

.sidebar-note span {
  color: #d56d99;
}

.sidebar-note p {
  margin: 7px 0 0;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 12px;
  line-height: 1.7;
}

.storage-label {
  margin: 13px 0 0;
  color: rgba(108, 77, 93, 0.55);
  font-size: 9px;
  text-align: center;
}

.main-content {
  width: min(1240px, calc(100% - 286px));
  margin-left: 276px;
  padding: 38px 24px 26px 0;
}

.page-content {
  min-height: calc(100vh - 100px);
  animation: page-in 420ms cubic-bezier(.2, .8, .2, 1);
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 3px 4px 24px;
}

.eyebrow {
  margin: 0 0 7px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-shadow: 0 2px 12px rgba(66, 37, 51, 0.25);
}

.page-heading h1 {
  margin: 0;
  color: white;
  font-family: "STKaiti", "KaiTi", ui-rounded, serif;
  font-size: clamp(29px, 3vw, 43px);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-shadow: 0 4px 18px rgba(70, 31, 52, 0.34);
}

.page-description {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  text-shadow: 0 2px 12px rgba(60, 27, 44, 0.25);
}

.hero-card {
  position: relative;
  min-height: 324px;
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(260px, 0.62fr);
  overflow: hidden;
  padding: clamp(30px, 5vw, 56px);
  border-radius: 30px;
}

.hero-card::before,
.hero-card::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.hero-card::before {
  width: 310px;
  height: 310px;
  top: -140px;
  right: 17%;
  background: rgba(255, 255, 255, 0.28);
  filter: blur(3px);
}

.hero-card::after {
  width: 190px;
  height: 190px;
  right: -55px;
  bottom: -76px;
  background: rgba(238, 211, 255, 0.36);
}

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

.ribbon-label {
  display: inline-flex;
  padding: 7px 12px;
  border: 1px solid rgba(219, 131, 170, 0.19);
  border-radius: 999px;
  color: #bd668c;
  background: rgba(255, 255, 255, 0.58);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.hero-kicker {
  margin: 24px 0 2px;
  color: #8f6879;
  font-size: 15px;
}

.countdown-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.countdown-line strong {
  color: #b84e7e;
  font-family: Georgia, serif;
  font-size: clamp(64px, 8vw, 96px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.05em;
}

.countdown-line span {
  color: #725160;
  font-size: 20px;
  font-weight: 700;
}

.hero-quote {
  margin: 13px 0 24px;
  color: #7c6070;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 15px;
}

.hero-actions,
.data-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-button,
.soft-button,
.ghost-button,
.danger-button,
.mini-button {
  min-height: 43px;
  padding: 0 20px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.primary-button {
  color: white;
  background: linear-gradient(135deg, #eb98b9, #cf6f9b);
  box-shadow: 0 12px 26px rgba(201, 91, 140, 0.28), inset 0 1px rgba(255, 255, 255, 0.48);
}

.soft-button {
  color: #ac4f78;
  background: linear-gradient(135deg, rgba(255, 237, 246, 0.96), rgba(255, 255, 255, 0.9));
  box-shadow: 0 10px 22px rgba(162, 83, 119, 0.12), inset 0 1px white;
}

.ghost-button {
  border: 1px solid rgba(205, 118, 157, 0.24);
  color: #a75f7e;
  background: rgba(255, 255, 255, 0.36);
}

.danger-button {
  color: #a54861;
  background: rgba(255, 226, 230, 0.75);
}

.primary-button:hover,
.soft-button:hover,
.ghost-button:hover,
.danger-button:hover,
.mini-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.03);
}

.primary-button:active,
.soft-button:active,
.ghost-button:active,
.danger-button:active,
.mini-button:active {
  transform: scale(0.97);
}

.compact-button {
  min-height: 40px;
  white-space: nowrap;
}

.full-button {
  width: 100%;
}

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
}

.moon-orb {
  position: relative;
  z-index: 2;
  width: 190px;
  height: 190px;
  display: grid;
  place-content: center;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 28%, white 0 4%, transparent 5%),
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.94), rgba(255, 230, 242, 0.78) 54%, rgba(226, 198, 246, 0.65));
  box-shadow:
    0 0 0 16px rgba(255, 255, 255, 0.13),
    0 0 55px rgba(232, 146, 185, 0.3),
    inset -20px -20px 38px rgba(199, 156, 219, 0.16);
  text-align: center;
  animation: gentle-float 5s ease-in-out infinite;
}

.moon-orb span {
  color: #db83aa;
}

.moon-orb small,
.moon-orb strong {
  display: block;
}

.moon-orb small {
  margin-top: 8px;
  color: #9e7185;
  font-size: 10px;
  letter-spacing: 0.1em;
}

.moon-orb strong {
  margin-top: 2px;
  color: #a34c74;
  font-family: Georgia, serif;
  font-size: 30px;
}

.orbit-star {
  position: absolute;
  color: #d37ba4;
  animation: twinkle 2.6s ease-in-out infinite;
}

.star-one { top: 11%; right: 13%; font-size: 25px; }
.star-two { bottom: 15%; right: 4%; font-size: 20px; animation-delay: .8s; }
.star-three { bottom: 11%; left: 11%; font-size: 17px; animation-delay: 1.4s; }

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 16px;
}

.metric-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 118px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  background: rgba(255, 251, 253, 0.75);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.metric-icon {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  flex: 0 0 43px;
  border-radius: 14px;
  color: #bc6189;
  background: var(--pink-100);
  font-size: 18px;
}

.accent-purple .metric-icon { color: #8662ad; background: var(--purple-100); }
.accent-blue .metric-icon { color: #5f87a6; background: var(--blue-100); }
.accent-cream .metric-icon { color: #a37c4b; background: var(--cream); }

.metric-card p,
.metric-card small,
.metric-card strong {
  display: block;
  margin: 0;
}

.metric-card p {
  color: #967888;
  font-size: 11px;
}

.metric-card strong {
  margin-top: 4px;
  color: #5b3e4d;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  line-height: 1.15;
}

.metric-card small {
  margin-top: 5px;
  color: #ac929f;
  font-size: 9px;
}

.home-columns,
.stats-grid,
.record-grid,
.settings-grid {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 16px;
  margin-top: 16px;
}

.content-card {
  padding: clamp(20px, 3vw, 28px);
  border-radius: 25px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.section-heading h2 {
  margin: 0;
  color: #624454;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 21px;
}

.section-heading p {
  margin: 5px 0 0;
  color: #a28795;
  font-size: 10px;
}

.text-button {
  padding: 6px 0;
  border: 0;
  color: #ba6288;
  background: none;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

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

.task-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 45px;
  padding: 10px 13px;
  border: 1px solid rgba(234, 195, 211, 0.36);
  border-radius: 14px;
  color: #6a4e5d;
  background: rgba(255, 255, 255, 0.42);
  font-size: 12px;
  cursor: pointer;
  transition: 170ms ease;
}

.task-row:hover {
  border-color: rgba(222, 132, 170, 0.28);
  background: rgba(255, 255, 255, 0.67);
  transform: translateX(2px);
}

.task-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.custom-check {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
  border: 1px solid #e3acc3;
  border-radius: 7px;
  color: transparent;
  background: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  transition: 170ms ease;
}

.task-row.is-done {
  color: #b49aa6;
}

.task-row.is-done .custom-check {
  border-color: transparent;
  color: white;
  background: linear-gradient(145deg, #eda0bf, #d06f9b);
  box-shadow: 0 5px 12px rgba(206, 94, 143, 0.22);
}

.task-row.is-done > span:last-child,
.task-row.is-done label > span:last-child {
  text-decoration: line-through;
}

.progress-track {
  height: 6px;
  margin-top: 17px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(202, 161, 181, 0.16);
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ef9ebf, #c988d6);
  box-shadow: 0 0 12px rgba(221, 105, 159, 0.28);
  transition: width 450ms ease;
}

.reminder-stack {
  display: grid;
  gap: 10px;
}

.reminder-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px;
  border: 0;
  border-radius: 14px;
  color: #725563;
  background: rgba(255, 255, 255, 0.42);
  text-align: left;
  cursor: pointer;
}

.reminder-item:hover { background: rgba(255, 255, 255, 0.7); }
.reminder-dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: #dd80aa; box-shadow: 0 0 0 5px rgba(221, 128, 170, 0.12); }
.reminder-item span:nth-child(2) { min-width: 0; flex: 1; }
.reminder-item strong, .reminder-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reminder-item strong { font-size: 11px; }
.reminder-item small { margin-top: 3px; color: #a98c99; font-size: 9px; }
.reminder-item b { color: #ca729a; }

.empty-state {
  min-height: 140px;
  display: grid;
  place-items: center;
  align-content: center;
  padding: 18px;
  color: #8b7180;
  text-align: center;
}

.empty-state > span {
  margin-bottom: 8px;
  color: #d67ca5;
  font-size: 28px;
}

.empty-state strong { font-family: "STKaiti", "KaiTi", serif; font-size: 16px; }
.empty-state p { margin: 5px 0 0; color: #a9919d; font-size: 10px; line-height: 1.6; }

.quote-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 72px;
  margin-bottom: 16px;
  padding: 15px 22px;
  border-radius: 22px;
  color: #865c70;
  text-align: center;
}

.quote-strip p { margin: 0; font-family: "STKaiti", "KaiTi", serif; font-size: 16px; }
.quote-strip span { color: #d0759e; font-size: 12px; }

.completion-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 13px 8px 8px;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  color: white;
}

.completion-badge > span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(150, 88, 118, 0.55) 57%, transparent 58%), conic-gradient(#fff var(--progress), rgba(255, 255, 255, 0.24) 0);
  font-size: 10px;
  font-weight: 800;
}

.completion-badge small { font-size: 10px; }

.task-row-large {
  justify-content: space-between;
  min-height: 58px;
  padding: 7px 9px 7px 15px;
}

.task-row-large > label {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
  cursor: pointer;
}

.task-index {
  color: #c290a8;
  font-family: Georgia, serif;
  font-size: 10px;
}

.icon-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  border: 1px solid rgba(223, 171, 194, 0.35);
  border-radius: 11px;
  color: #a8768d;
  background: rgba(255, 255, 255, 0.46);
  cursor: pointer;
}

.icon-button:disabled { opacity: .35; cursor: not-allowed; }
.danger-icon { opacity: 0; color: #b34f6a; transition: opacity 160ms ease; }
.task-row-large:hover .danger-icon, .danger-icon:focus { opacity: 1; }

.inline-form {
  display: flex;
  align-items: flex-end;
  gap: 11px;
}

.add-task-form {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px dashed rgba(194, 125, 157, 0.22);
}

.grow { flex: 1; }

.field {
  display: grid;
  gap: 7px;
}

.field > span,
.mood-field legend {
  color: #765766;
  font-size: 10px;
  font-weight: 750;
}

.field input,
.field textarea,
.field select,
.stage-copy input {
  width: 100%;
  border: 1px solid rgba(213, 151, 179, 0.25);
  outline: 0;
  border-radius: 13px;
  color: #5f4552;
  background: rgba(255, 255, 255, 0.6);
  transition: border 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field input,
.field select {
  height: 43px;
  padding: 0 13px;
}

.field textarea {
  min-height: 78px;
  padding: 12px 13px;
  resize: vertical;
  line-height: 1.6;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.stage-copy input:focus {
  border-color: rgba(213, 103, 153, 0.55);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 0 4px rgba(224, 126, 171, 0.1);
}

.field input::placeholder,
.field textarea::placeholder { color: #c3abb6; }

.sunday-card {
  min-height: 390px;
  display: grid;
  place-items: center;
  align-content: center;
  padding: 40px;
  border-radius: 28px;
  text-align: center;
}

.sunday-moon {
  width: 115px;
  height: 115px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #a56889;
  background: radial-gradient(circle at 35% 30%, #fff, #ffe5f1 58%, #dfc9f1);
  box-shadow: 0 0 45px rgba(224, 132, 174, .25);
  font-size: 48px;
}

.sunday-card h2 { margin: 25px 0 8px; font-family: "STKaiti", "KaiTi", serif; font-size: 25px; }
.sunday-card p { max-width: 460px; margin: 0; color: #937584; font-size: 12px; line-height: 1.8; }

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}

.day-card {
  min-height: 178px;
  padding: 13px;
  border: 1px solid rgba(230, 190, 208, 0.38);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.38);
}

.day-card.is-today {
  border-color: rgba(221, 117, 164, 0.48);
  background: linear-gradient(145deg, rgba(255, 237, 246, 0.92), rgba(255, 255, 255, 0.64));
  box-shadow: 0 10px 25px rgba(183, 80, 130, 0.13);
  transform: translateY(-4px);
}

.day-card.is-rest { background: rgba(241, 235, 255, 0.48); }
.day-top { display: flex; align-items: center; justify-content: space-between; }
.day-top > span { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 10px; color: #be648c; background: var(--pink-100); font-family: "STKaiti", "KaiTi", serif; font-size: 15px; font-weight: 700; }
.day-top small { padding: 4px 7px; border-radius: 999px; color: white; background: #d875a2; font-size: 8px; }
.day-card h3 { margin: 13px 0 10px; font-size: 12px; }
.day-card ul { display: grid; gap: 7px; margin: 0; padding: 0; color: #927786; font-size: 9px; line-height: 1.5; list-style: none; }
.day-card li::before { content: "·"; margin-right: 4px; color: #d879a3; font-weight: 900; }

.stage-timeline { display: grid; }
.stage-row { position: relative; display: flex; align-items: center; gap: 15px; min-height: 88px; padding: 12px 0; }
.stage-row:not(:last-child)::after { content: ""; position: absolute; left: 20px; top: 65px; bottom: -18px; width: 1px; background: linear-gradient(#e6abc5, rgba(230, 171, 197, 0.12)); }
.stage-marker { position: relative; z-index: 1; width: 41px; height: 41px; flex: 0 0 41px; border: 1px solid #e1a9c1; border-radius: 50%; color: #b66b8b; background: rgba(255, 255, 255, 0.78); font-family: Georgia, serif; cursor: pointer; }
.stage-row.is-current .stage-marker { border-color: transparent; color: white; background: linear-gradient(145deg, #ef9fbe, #c875a7); box-shadow: 0 0 0 7px rgba(229, 134, 175, .11), 0 8px 18px rgba(190, 79, 127, .24); }
.stage-copy { min-width: 0; flex: 1; }
.stage-copy > div { display: flex; align-items: center; gap: 9px; }
.stage-copy h3 { margin: 0; font-size: 12px; }
.stage-copy span { padding: 3px 7px; border-radius: 999px; color: #ba5e86; background: #ffe9f2; font-size: 8px; font-weight: 700; }
.stage-copy input { height: 36px; margin-top: 7px; padding: 0 10px; color: #88707d; font-size: 10px; }
.stage-actions { display: flex; gap: 6px; }

.review-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr);
  gap: 16px;
}

.review-side { display: grid; align-content: start; gap: 16px; }
.review-form, .stack-form { display: grid; gap: 17px; }
.form-grid { display: grid; gap: 12px; }
.two-columns { grid-template-columns: repeat(2, 1fr); }
.three-columns { grid-template-columns: 1.2fr .7fr .7fr; }
.mood-field { margin: 0; padding: 0; border: 0; }
.mood-options { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 9px; }
.mood-options button { height: 48px; border: 1px solid rgba(220, 163, 189, .28); border-radius: 14px; background: rgba(255, 255, 255, .44); font-size: 20px; cursor: pointer; transition: 170ms ease; }
.mood-options button:hover, .mood-options button.selected { border-color: rgba(216, 105, 155, .5); background: #fff0f6; transform: translateY(-2px); box-shadow: 0 8px 18px rgba(192, 83, 133, .11); }
.wrong-list { display: grid; gap: 10px; }
.wrong-card { display: flex; align-items: center; gap: 12px; padding: 13px; border: 1px solid rgba(228, 180, 201, .34); border-radius: 15px; background: rgba(255, 255, 255, .4); }
.wrong-card > div { min-width: 0; flex: 1; }
.wrong-card span { color: #c16a91; font-size: 8px; font-weight: 700; }
.wrong-card h3 { margin: 4px 0; overflow: hidden; color: #674856; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.wrong-card p { margin: 0; overflow: hidden; color: #9a808d; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.mini-button { min-height: 34px; padding: 0 11px; color: #ad527a; background: #ffeaf3; font-size: 9px; }

.stats-metrics { margin-top: 0; }
.stats-grid { grid-template-columns: 1.2fr .8fr; }
.record-grid { grid-template-columns: 1fr 1fr; }
.bar-chart { height: 245px; display: flex; align-items: flex-end; justify-content: space-around; gap: 9px; padding-top: 22px; border-bottom: 1px solid rgba(194, 135, 162, .2); background: repeating-linear-gradient(to bottom, transparent 0 48px, rgba(194, 135, 162, .08) 49px); }
.bar-column { height: 100%; min-width: 28px; display: grid; grid-template-rows: 20px 1fr 24px; justify-items: center; flex: 1; }
.bar-column strong { color: #b85f86; font-family: Georgia, serif; font-size: 10px; }
.bar-rail { position: relative; width: min(34px, 80%); height: 100%; display: flex; align-items: flex-end; overflow: hidden; border-radius: 10px 10px 3px 3px; background: rgba(220, 179, 199, .14); }
.bar-rail span { width: 100%; min-height: 3px; border-radius: inherit; background: linear-gradient(#eea1c0, #c878a8); box-shadow: 0 0 15px rgba(203, 91, 142, .2); animation: bar-grow 700ms cubic-bezier(.2,.8,.2,1); transform-origin: bottom; }
.bar-column small { align-self: end; color: #9f8794; font-size: 8px; }
.accuracy-list { display: grid; gap: 15px; }
.accuracy-row > div:first-child { display: flex; align-items: center; justify-content: space-between; }
.accuracy-row span { color: #71525f; font-size: 10px; font-weight: 700; }
.accuracy-row strong { color: #bd668c; font-family: Georgia, serif; font-size: 12px; }
.accuracy-row .progress-track { height: 5px; margin: 7px 0 4px; }
.accuracy-row small { color: #ac929f; font-size: 8px; }

.settings-grid {
  grid-template-columns: 1fr 1fr;
}

.data-card {
  grid-column: 1 / -1;
}

.toggle-list { display: grid; gap: 10px; }
.toggle-row { position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 62px; padding: 10px 11px; border-radius: 15px; background: rgba(255,255,255,.38); cursor: pointer; }
.toggle-row > span { min-width: 0; }
.toggle-row strong, .toggle-row small { display: block; }
.toggle-row strong { color: #6a4c5a; font-size: 11px; }
.toggle-row small { margin-top: 4px; color: #a58a97; font-size: 8px; }
.toggle-row input { position: absolute; opacity: 0; }
.toggle-row i { position: relative; width: 43px; height: 24px; flex: 0 0 43px; border-radius: 999px; background: #e5d7de; transition: 180ms ease; }
.toggle-row i::after { content: ""; position: absolute; width: 18px; height: 18px; top: 3px; left: 3px; border-radius: 50%; background: white; box-shadow: 0 2px 7px rgba(82, 42, 62, .15); transition: 180ms ease; }
.toggle-row input:checked + i { background: linear-gradient(90deg, #eca0bd, #cf78a4); }
.toggle-row input:checked + i::after { transform: translateX(19px); }
.install-note { display: flex; gap: 12px; margin-top: 18px; padding: 15px; border: 1px dashed rgba(198, 109, 149, .25); border-radius: 16px; background: rgba(255, 240, 247, .5); }
.install-note > span { width: 35px; height: 35px; display: grid; place-items: center; flex: 0 0 35px; border-radius: 11px; color: #b85b84; background: white; }
.install-note strong { font-size: 10px; }
.install-note p, .privacy-note { margin: 5px 0 0; color: #9c808e; font-size: 9px; line-height: 1.65; }
.file-button { display: inline-grid; place-items: center; }
.file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.privacy-note { margin-top: 13px; }

.mobile-topbar,
.mobile-nav {
  display: none;
}

.petals {
  position: fixed;
  z-index: 5;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.petals span {
  position: absolute;
  top: -8%;
  left: calc((var(--i) * 8.5%));
  color: rgba(255, 224, 239, 0.46);
  font-size: calc(10px + (var(--i) % 4) * 3px);
  text-shadow: 0 0 12px rgba(247, 192, 218, .3);
  animation: petal-fall calc(12s + (var(--i) % 6) * 2s) linear infinite;
  animation-delay: calc(var(--i) * -1.8s);
}

.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 999px;
  color: #7b5366;
  background: rgba(255, 247, 251, .92);
  box-shadow: 0 15px 40px rgba(82, 41, 62, .22);
  backdrop-filter: blur(18px);
  font-size: 11px;
  transform: translateX(-50%);
  animation: toast-in 260ms ease;
}

.toast span { color: #d873a0; }

footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  color: rgba(255, 255, 255, .74);
  font-size: 9px;
  text-align: center;
  text-shadow: 0 2px 10px rgba(65, 31, 48, .25);
}

footer p { margin: 0; }
footer span { font-size: 8px; }

.loading-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 15px;
  color: #8d6176;
  background: linear-gradient(145deg, #fff4f8, #eee4ff);
}

.loading-screen p { margin: 0; font-family: "STKaiti", "KaiTi", serif; }
.loading-flower { font-size: 38px; animation: gentle-float 2s ease-in-out infinite; }

@keyframes page-in {
  from { opacity: 0; transform: translateY(9px) scale(.995); }
  to { opacity: 1; transform: none; }
}

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

@keyframes twinkle {
  0%, 100% { opacity: .38; transform: scale(.85); }
  50% { opacity: 1; transform: scale(1.12); }
}

@keyframes petal-fall {
  0% { transform: translate3d(0, -5vh, 0) rotate(0); opacity: 0; }
  10% { opacity: .75; }
  65% { transform: translate3d(45px, 70vh, 0) rotate(240deg); }
  100% { transform: translate3d(-20px, 112vh, 0) rotate(440deg); opacity: 0; }
}

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 10px) scale(.96); }
}

@keyframes bar-grow {
  from { transform: scaleY(0); }
}

@media (max-width: 1050px) {
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .week-grid { grid-template-columns: repeat(4, 1fr); }
  .day-card:last-child { grid-column: span 2; }
}

@media (max-width: 820px) {
  body { padding-bottom: 84px; }
  .sidebar { display: none; }
  .main-content { width: 100%; margin: 0; padding: 14px 14px 0; }
  .mobile-topbar { position: sticky; z-index: 30; top: 10px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; padding: 10px 12px; border-radius: 20px; }
  .mobile-topbar .brand-mark { width: 38px; height: 38px; flex-basis: 38px; border-radius: 13px; }
  .round-avatar { width: 37px; height: 37px; display: grid; place-items: center; border: 1px solid white; border-radius: 50%; color: white; background: linear-gradient(145deg, #e99aba, #c978a6); font-size: 12px; font-weight: 800; }
  .mobile-nav { position: fixed; z-index: 50; right: 12px; bottom: 11px; left: 12px; display: grid; grid-template-columns: repeat(6, 1fr); padding: 7px 5px; border-radius: 22px; }
  .mobile-nav button { min-width: 0; height: 52px; display: grid; place-items: center; align-content: center; gap: 3px; border: 0; border-radius: 15px; color: #9b7b8a; background: none; cursor: pointer; }
  .mobile-nav button span { font-size: 17px; line-height: 1; }
  .mobile-nav button small { font-size: 8px; }
  .mobile-nav button.active { color: #b64e7c; background: linear-gradient(145deg, #ffeaf3, rgba(255,255,255,.82)); box-shadow: 0 7px 15px rgba(165, 66, 112, .12); }
  .page-heading { margin-bottom: 18px; }
  .hero-card { grid-template-columns: 1fr .62fr; padding: 30px; }
  .moon-orb { width: 150px; height: 150px; }
  .home-columns, .stats-grid, .record-grid, .settings-grid, .review-grid { grid-template-columns: 1fr; }
  .data-card { grid-column: auto; }
  .toast { bottom: 86px; }
}

@media (max-width: 620px) {
  .main-content { padding-inline: 10px; }
  .mobile-topbar { margin-bottom: 24px; }
  .page-heading { align-items: flex-start; }
  .page-description { max-width: 290px; line-height: 1.6; }
  .page-heading > .soft-button, .page-heading > .completion-badge { margin-top: 3px; }
  .hero-card { min-height: 420px; grid-template-columns: 1fr; padding: 27px 24px; }
  .hero-visual { position: absolute; right: -25px; bottom: 22px; opacity: .82; }
  .moon-orb { width: 128px; height: 128px; }
  .moon-orb small { font-size: 8px; }
  .moon-orb strong { font-size: 24px; }
  .hero-copy { z-index: 3; }
  .hero-quote { max-width: 250px; }
  .hero-actions { max-width: 225px; }
  .metrics-grid { gap: 9px; }
  .metric-card { min-height: 106px; gap: 10px; padding: 13px; border-radius: 19px; }
  .metric-icon { width: 35px; height: 35px; flex-basis: 35px; border-radius: 11px; font-size: 15px; }
  .metric-card strong { font-size: 17px; }
  .metric-card small { font-size: 8px; }
  .week-grid { grid-template-columns: repeat(2, 1fr); }
  .day-card:last-child { grid-column: span 2; }
  .two-columns, .three-columns { grid-template-columns: 1fr; }
  .inline-form { align-items: stretch; flex-direction: column; }
  .inline-form .primary-button { width: 100%; }
  .danger-icon { opacity: 1; }
  .completion-badge small { display: none; }
  .completion-badge { padding: 5px; background: rgba(255,255,255,.18); }
  .quote-strip { gap: 8px; }
  .quote-strip p { font-size: 14px; }
  .stage-actions { flex-direction: column; }
  .bar-chart { height: 220px; gap: 4px; }
  .bar-column { min-width: 20px; }
  .data-actions { display: grid; }
  footer { padding-bottom: 14px; }
}

@media (max-width: 390px) {
  .page-heading h1 { font-size: 28px; }
  .page-heading .compact-button { padding-inline: 12px; font-size: 10px; }
  .metrics-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 92px; }
  .mobile-nav { right: 7px; bottom: 7px; left: 7px; }
  .mobile-nav button small { font-size: 7px; }
  .mood-options button { font-size: 17px; }
}

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

html[data-motion="reduced"] *,
html[data-motion="reduced"] *::before,
html[data-motion="reduced"] *::after {
  scroll-behavior: auto !important;
  animation-duration: .01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .01ms !important;
}
