:root {
  --cream: #fff9e9;
  --paper: #fffdf6;
  --cocoa: #57382c;
  --coral: #ff7f70;
  --mint: #8ed8b9;
  --aqua: #70d8e6;
  --yellow: #ffd55c;
  --line: #f1dfbd;
  font-family: ui-rounded, "SF Pro Rounded", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--cocoa);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 9%, #fff0a9 0 4%, transparent 4.2%),
    radial-gradient(circle at 94% 24%, #bcece9 0 5%, transparent 5.2%),
    linear-gradient(150deg, #fff7d5, #ffedcf 58%, #dff8f1);
}
button, input { font: inherit; }
button { cursor: pointer; }
.app-shell { max-width: 560px; min-height: calc(100vh - 82px); margin: auto; padding: calc(24px + env(safe-area-inset-top)) 20px 112px; }
.page { animation: rise .28s ease-out; }
.page[hidden] { display: none; }
@keyframes rise { from { opacity: .2; transform: translateY(8px); } }

.hero, .settings-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.eyebrow { margin: 0 0 7px; color: #a57245; font-weight: 800; font-size: 14px; letter-spacing: .04em; }
h1 { margin: 0; font-size: clamp(34px, 10vw, 48px); letter-spacing: -.06em; line-height: 1; }
h1 span { color: var(--coral); font-size: .62em; vertical-align: top; }
.warm-line { margin: 12px 0 0; font-size: 16px; font-weight: 700; }
.mascot { width: 112px; height: 134px; object-fit: cover; object-position: center; border: 4px solid rgba(255,255,255,.72); border-radius: 44% 56% 47% 53%; box-shadow: 0 12px 24px rgba(185,111,68,.17); background: var(--yellow); }

.progress-card { margin: 22px 0 26px; display: grid; place-items: center; text-align: center; }
.drop-ring { --progress: 0%; width: min(69vw, 292px); aspect-ratio: 1; display: grid; place-items: center; border-radius: 48% 52% 55% 45% / 42% 42% 58% 58%; background: conic-gradient(from 210deg, var(--aqua) var(--progress), #fffdf6 0); padding: 15px; transform: rotate(45deg); box-shadow: 0 15px 25px rgba(59,169,188,.17); }
.ring-content { width: 100%; height: 100%; display: grid; align-content: center; justify-items: center; border-radius: inherit; background: linear-gradient(180deg, #fffef9 0 58%, #def9fb 100%); transform: rotate(-45deg); box-shadow: inset 0 0 0 1px rgba(91,211,224,.35); }
.ring-content strong { font-size: clamp(42px, 13vw, 62px); line-height: .85; letter-spacing: -.08em; }
.ring-content span { font-size: 20px; font-weight: 900; margin: 5px 0 11px; color: #258f9e; }
.ring-content small { font-size: 15px; font-weight: 800; }
.goal-copy { margin: 23px 0 0; font-size: 15px; font-weight: 700; }.goal-copy b { color: #168c8d; }

.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 13px; }.section-heading h2, .settings-card h2 { margin: 0; font-size: 18px; letter-spacing: -.03em; }.compact { margin-top: 29px; }.sparkle { color: var(--coral); font-size: 26px; }
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }.quick-add { min-height: 76px; border: 0; border-radius: 24px; color: var(--cocoa); font-size: 19px; font-weight: 900; box-shadow: 0 5px 0 rgba(87,56,44,.11); transition: transform .15s, box-shadow .15s; }.quick-add span { display: block; margin-top: 3px; font-size: 12px; font-weight: 800; }.quick-add:active { transform: translateY(4px); box-shadow: 0 1px 0 rgba(87,56,44,.11); }.mint { background: #bdebd5; }.aqua { background: #bfeef4; }.coral { background: #ffc2bb; }.yellow { background: #ffe7a2; }
.message-card { display: flex; align-items: center; gap: 10px; margin-top: 20px; border: 2px solid #ffd7d0; border-radius: 20px 20px 20px 5px; padding: 13px 16px; background: rgba(255,255,255,.68); }.message-card p { margin: 0; font-size: 15px; font-weight: 800; }.bubble-icon { font-size: 23px; }
.history-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }.history-list li { display: flex; justify-content: space-between; align-items: center; padding: 12px 15px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,253,246,.75); font-weight: 800; }.history-list .empty { justify-content: center; color: #9a7b61; font-size: 14px; }.text-button { border: 0; background: transparent; color: #c66a5d; font-size: 14px; font-weight: 900; }

.settings-hero { display: block; padding: 8px 0 20px; }.settings-card { margin: 14px 0; padding: 21px; border: 2px solid rgba(255,255,255,.72); border-radius: 27px; background: rgba(255,253,246,.82); box-shadow: 0 10px 20px rgba(122,91,58,.08); }.settings-card label { display: flex; justify-content: space-between; font-size: 17px; font-weight: 900; }.settings-card output { color: #149799; }.settings-card input[type="range"] { width: 100%; margin: 22px 0 10px; accent-color: var(--coral); }.range-labels { display: flex; justify-content: space-between; color: #a17a60; font-size: 12px; font-weight: 700; }.backup-card p { color: #735b4a; font-size: 14px; line-height: 1.55; }.backup-actions { display: flex; gap: 10px; flex-wrap: wrap; }.secondary-button { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; padding: 0 15px; border: 2px solid #f4c893; border-radius: 14px; background: #fff2cc; color: var(--cocoa); font-weight: 900; text-decoration: none; }.import-label { cursor: pointer; }.shortcut-tip { display: flex; gap: 12px; align-items: flex-start; padding: 18px; border-radius: 22px; background: #d9f4f0; }.shortcut-tip span { font-size: 24px; }.shortcut-tip p { margin: 0; line-height: 1.55; font-size: 14px; }

.tab-bar { position: fixed; z-index: 5; bottom: 0; left: 50%; width: min(100%, 560px); transform: translateX(-50%); display: grid; grid-template-columns: 1fr 1fr; padding: 10px 20px calc(13px + env(safe-area-inset-bottom)); border-radius: 28px 28px 0 0; background: rgba(255,253,246,.93); box-shadow: 0 -5px 22px rgba(88,64,40,.1); backdrop-filter: blur(12px); }.tab { border: 0; border-radius: 18px; padding: 8px; background: transparent; color: #8d715c; font-size: 13px; font-weight: 900; }.tab span { display: block; font-size: 22px; margin-bottom: 1px; }.tab.is-active { color: var(--cocoa); background: #ffe8a0; }
@media (max-width: 390px) { .app-shell { padding-inline: 15px; }.quick-grid { gap: 6px; }.quick-add { border-radius: 20px; font-size: 17px; }.mascot { width: 96px; height: 118px; }.history-list li { padding: 11px 13px; } }
