:root {
  --bg: #fff8e8;
  --bg-deep: #fff3d6;
  --surface: #fffdf8;
  --surface-strong: #ffffff;
  --ink: #263326;
  --ink-soft: #445041;
  --muted: #7f8878;
  --line: rgba(54, 68, 45, 0.1);
  --line-strong: rgba(54, 68, 45, 0.16);
  --mango: #ff9d1f;
  --mango-light: #ffd75c;
  --mango-deep: #ed6e1d;
  --mango-wash: #fff0c9;
  --leaf: #3f7f4c;
  --leaf-deep: #2d6539;
  --leaf-wash: #e9f3e4;
  --peach: #ffe5cd;
  --rose: #e86552;
  --shadow-sm: 0 8px 24px rgba(93, 67, 19, 0.07);
  --shadow-md: 0 18px 48px rgba(104, 70, 13, 0.12);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-height: 76px;
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body {
  min-height: 100dvh;
  background: radial-gradient(circle at 8% 2%, rgba(255, 218, 98, 0.42), transparent 30%), radial-gradient(circle at 92% 18%, rgba(114, 165, 90, 0.18), transparent 30%), radial-gradient(circle at 50% 100%, rgba(255, 151, 54, 0.15), transparent 42%), #f5eedf;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input { font: inherit; }
button { color: inherit; cursor: pointer; }
button, label { -webkit-user-select: none; user-select: none; }
svg { display: block; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.app-shell {
  position: relative;
  width: min(100%, 460px);
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 34%), var(--bg);
}
.views { height: calc(100% - var(--nav-height) - var(--safe-bottom)); overflow-x: hidden; overflow-y: auto; scrollbar-width: none; overscroll-behavior-y: contain; }
.views::-webkit-scrollbar { display: none; }
.view { display: none; min-height: 100%; padding: max(18px, env(safe-area-inset-top)) 18px 30px; }
.view.is-active { display: block; animation: view-in 280ms cubic-bezier(0.2, 0.75, 0.25, 1); }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.page-head { position: relative; z-index: 2; padding: 2px 2px 18px; }
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand-lockup { display: flex; align-items: center; gap: 10px; }
.brand-mango { width: 44px; height: 44px; filter: drop-shadow(0 6px 10px rgba(237, 110, 29, 0.18)); }
.brand-name { font-size: 24px; line-height: 1.05; font-weight: 850; letter-spacing: -0.06em; }
.brand-sub { margin-top: 2px; color: var(--muted); font-size: 11px; font-weight: 650; letter-spacing: 0.12em; }
.date-line { display: flex; align-items: center; gap: 8px; margin-top: 16px; color: var(--ink-soft); font-size: 13px; font-weight: 650; }
.date-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--mango); }
.eyebrow { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: 0.15em; text-transform: uppercase; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 30px; line-height: 1.1; font-weight: 850; letter-spacing: -0.055em; }
h2 { margin-top: 3px; font-size: 20px; line-height: 1.2; font-weight: 820; letter-spacing: -0.035em; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 42px; height: 42px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: rgba(255, 255, 255, 0.7); box-shadow: 0 5px 16px rgba(71, 55, 20, 0.05); transition: transform 160ms ease, background 160ms ease; }
.icon-button:active { transform: scale(0.94); background: #fff; }
.icon-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hero-card { position: relative; isolation: isolate; overflow: hidden; padding: 19px 18px 16px; border: 1px solid rgba(255, 255, 255, 0.55); border-radius: var(--radius-xl); background: radial-gradient(circle at 77% 26%, rgba(255, 255, 255, 0.72), transparent 27%), linear-gradient(145deg, #ffd95f 0%, #ffc542 42%, #ffa42d 100%); box-shadow: 0 20px 44px rgba(231, 139, 26, 0.19); }
.hero-card::before, .hero-card::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.32); }
.hero-card::before { width: 170px; height: 170px; right: -74px; top: -86px; }
.hero-card::after { width: 120px; height: 120px; left: -65px; bottom: 88px; }
.hero-glow { position: absolute; width: 210px; height: 210px; right: -90px; bottom: -100px; border-radius: 50%; background: rgba(255, 236, 171, 0.45); filter: blur(6px); z-index: -1; }
.hero-topline { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.hero-topline .eyebrow { color: rgba(78, 54, 11, 0.67); }
.hero-topline h1 { margin-top: 3px; color: #40300b; font-size: 18px; font-weight: 780; letter-spacing: -0.03em; }
.week-strip { display: flex; gap: 4px; padding: 5px; border: 1px solid rgba(91, 59, 7, 0.08); border-radius: 14px; background: rgba(255, 255, 255, 0.3); backdrop-filter: blur(10px); }
.week-day { position: relative; display: grid; justify-items: center; gap: 2px; width: 23px; color: rgba(74, 49, 5, 0.58); font-size: 8px; font-weight: 750; }
.week-day b { display: flex; align-items: center; justify-content: center; width: 21px; height: 21px; border-radius: 50%; font-size: 10px; }
.week-day.is-today b { background: var(--ink); color: #fff7dd; box-shadow: 0 3px 9px rgba(44, 51, 34, 0.2); }
.week-day.has-work::after { content: ""; position: absolute; bottom: -3px; width: 3px; height: 3px; border-radius: 50%; background: var(--leaf); }
.ring-wrap { position: relative; width: 190px; height: 190px; margin: 3px auto 2px; }
.progress-ring { width: 190px; height: 190px; transform: rotate(-90deg); overflow: visible; }
.ring-track, .ring-progress { fill: none; stroke-width: 13; }
.ring-track { stroke: rgba(255, 255, 255, 0.5); }
.ring-progress { stroke: url(#ringGradient); stroke-linecap: round; stroke-dasharray: 477.5; stroke-dashoffset: 477.5; filter: drop-shadow(0 7px 9px rgba(238, 111, 22, 0.22)); transition: stroke-dashoffset 780ms cubic-bezier(0.16, 0.9, 0.28, 1); }
.ring-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; transform: translateY(3px); }
.ring-value { color: #392b0d; font-size: 43px; line-height: 1; font-weight: 880; letter-spacing: -0.07em; }
.ring-value small { color: rgba(71, 52, 15, 0.6); font-size: 16px; font-weight: 720; letter-spacing: -0.04em; }
.ring-label { margin-top: 8px; color: rgba(76, 53, 9, 0.62); font-size: 11px; font-weight: 750; letter-spacing: 0.15em; }
.ring-mascot { position: absolute; right: -1px; bottom: 13px; width: 50px; height: 50px; filter: drop-shadow(0 6px 8px rgba(147, 87, 8, 0.16)); animation: mascot-bob 2.8s ease-in-out infinite; transform-origin: center bottom; }
@keyframes mascot-bob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-4px) rotate(3deg); } }
.primary-button { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-height: 54px; padding: 0 20px; border: 0; border-radius: 18px; background: var(--ink); color: #fff9e8; box-shadow: 0 12px 22px rgba(45, 51, 34, 0.18); font-weight: 780; letter-spacing: 0.02em; transition: transform 160ms ease, box-shadow 160ms ease; }
.primary-button:active { transform: translateY(2px) scale(0.99); box-shadow: 0 6px 14px rgba(45, 51, 34, 0.17); }
.primary-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.hero-tip { margin-top: 10px; color: rgba(72, 50, 8, 0.66); text-align: center; font-size: 11px; font-weight: 650; }
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: 12px; }
.stat-card { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 12px 10px; border: 1px solid rgba(255, 255, 255, 0.72); border-radius: 18px; background: rgba(255, 255, 255, 0.6); box-shadow: var(--shadow-sm); }
.stat-icon { display: grid; place-items: center; flex: 0 0 auto; width: 30px; height: 30px; border-radius: 11px; }
.stat-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stat-streak .stat-icon { color: var(--mango-deep); background: var(--mango-wash); }
.stat-days .stat-icon { color: var(--leaf); background: var(--leaf-wash); }
.stat-strength .stat-icon { color: #8e5c48; background: #f8e9df; }
.stat-card div:last-child { display: grid; min-width: 0; }
.stat-card strong { font-size: 19px; line-height: 1.1; font-weight: 840; letter-spacing: -0.04em; }
.stat-card span { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.section-block { margin-top: 25px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.soft-label { color: var(--muted); font-size: 10px; font-weight: 650; white-space: nowrap; }
.text-button { padding: 5px 0; border: 0; background: transparent; color: var(--mango-deep); font-size: 11px; font-weight: 780; }
.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.quick-item { position: relative; display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; align-items: center; column-gap: 10px; min-height: 78px; padding: 13px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.7); border-radius: 21px; background: var(--surface); box-shadow: var(--shadow-sm); text-align: left; transition: transform 160ms ease, box-shadow 160ms ease; }
.quick-item::after { content: ""; position: absolute; width: 55px; height: 55px; right: -24px; bottom: -29px; border-radius: 50%; background: currentColor; opacity: 0.05; }
.quick-item:active { transform: scale(0.975); box-shadow: 0 4px 12px rgba(93, 67, 19, 0.08); }
.quick-icon { grid-row: 1 / span 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 14px; }
.quick-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.quick-item > span:nth-child(2) { align-self: end; font-size: 14px; font-weight: 800; }
.quick-item small { align-self: start; overflow: hidden; color: var(--muted); font-size: 9px; font-weight: 620; text-overflow: ellipsis; white-space: nowrap; }
.tone-run { color: #d86135; }
.tone-walk { color: var(--leaf); }
.tone-strength { color: #8b5b3f; }
.tone-yoga { color: #9e6d8c; }
.tone-run .quick-icon { background: #ffeadf; }
.tone-walk .quick-icon { background: #e9f4e6; }
.tone-strength .quick-icon { background: #f3e8dd; }
.tone-yoga .quick-icon { background: #f3e9f0; }
.record-list { display: grid; gap: 8px; }
.record-item { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid rgba(255, 255, 255, 0.76); border-radius: 19px; background: rgba(255, 255, 255, 0.66); box-shadow: 0 6px 20px rgba(93, 67, 19, 0.045); }
.record-icon, .activity-dot { display: grid; place-items: center; flex: 0 0 auto; width: 40px; height: 40px; border-radius: 14px; }
.record-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.record-main { min-width: 0; flex: 1; }
.record-title-row { display: flex; align-items: center; gap: 7px; }
.record-title-row strong { overflow: hidden; font-size: 13px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.record-main p { margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 10px; font-weight: 620; text-overflow: ellipsis; white-space: nowrap; }
.record-side { flex: 0 0 auto; text-align: right; }
.record-side strong { display: block; color: var(--ink-soft); font-size: 13px; font-weight: 820; }
.record-side span { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; font-weight: 650; }
.record-delete { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: #aa8d80; opacity: 0.7; }
.record-delete:active { background: #fcebe5; color: var(--rose); }
.record-delete svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.empty-card { display: grid; justify-items: center; gap: 4px; padding: 25px 16px; border: 1px dashed rgba(95, 81, 46, 0.18); border-radius: 20px; background: rgba(255, 255, 255, 0.42); color: var(--muted); text-align: center; }
.empty-card b { color: var(--ink-soft); font-size: 13px; }
.empty-card span { font-size: 10px; }
.mango-note { position: relative; display: flex; gap: 13px; margin-top: 24px; padding: 18px; overflow: hidden; border-radius: 24px; background: var(--leaf); color: #f4f9e8; box-shadow: 0 14px 30px rgba(43, 93, 52, 0.15); }
.mango-note::after { content: ""; position: absolute; width: 100px; height: 100px; right: -35px; bottom: -55px; border-radius: 50%; background: rgba(255, 238, 163, 0.12); }
.mango-note .eyebrow { color: rgba(243, 250, 231, 0.63); }
.mango-note p { margin-top: 5px; font-size: 13px; font-weight: 650; line-height: 1.6; }
.note-sticker { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 12px; background: rgba(255, 255, 255, 0.14); }
.note-sticker svg { width: 17px; height: 17px; fill: none; stroke: #ffeaa2; stroke-width: 1.8; }
.bottom-space { height: calc(var(--nav-height) + var(--safe-bottom) + 16px); }
.bottom-nav { position: absolute; z-index: 30; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); height: calc(var(--nav-height) + var(--safe-bottom)); padding: 8px 18px calc(8px + var(--safe-bottom)); border-top: 1px solid rgba(79, 79, 54, 0.08); background: rgba(255, 251, 241, 0.88); backdrop-filter: blur(22px) saturate(150%); box-shadow: 0 -12px 28px rgba(109, 84, 32, 0.06); }
.nav-item { position: relative; display: grid; place-content: center; justify-items: center; gap: 3px; padding: 0; border: 0; background: transparent; color: #9b9b88; transition: color 180ms ease, transform 180ms ease; }
.nav-item:active { transform: scale(0.94); }
.nav-item svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.nav-item span { font-size: 9px; font-weight: 750; }
.nav-item i { position: absolute; bottom: 1px; width: 4px; height: 4px; border-radius: 50%; background: transparent; }
.nav-item.is-active { color: var(--ink); }
.nav-item.is-active i { background: var(--mango); }
.compact-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-top: 12px; }
.compact-head h1 { margin-top: 3px; font-size: 31px; }
.today-pill, .week-badge { display: inline-flex; align-items: center; min-height: 34px; padding: 0 13px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, 0.62); color: var(--mango-deep); font-size: 10px; font-weight: 780; }
.calendar-card { padding: 16px 14px 13px; border: 1px solid rgba(255, 255, 255, 0.8); border-radius: var(--radius-lg); background: rgba(255, 255, 255, 0.7); box-shadow: var(--shadow-sm); }
.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 0 1px 13px; }
.calendar-toolbar > div { display: grid; justify-items: center; gap: 2px; }
.calendar-toolbar strong { font-size: 17px; font-weight: 820; letter-spacing: -0.03em; }
.calendar-toolbar span { color: var(--muted); font-size: 9px; font-weight: 650; letter-spacing: 0.08em; }
.calendar-toolbar .icon-button { width: 36px; height: 36px; }
.calendar-toolbar .icon-button svg { width: 17px; height: 17px; }
.weekday-row, .calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.weekday-row { margin-bottom: 4px; color: #a0a18f; font-size: 9px; font-weight: 780; text-align: center; }
.calendar-day { position: relative; display: grid; place-items: center; aspect-ratio: 1; min-height: 37px; padding: 0; border: 0; border-radius: 13px; background: transparent; color: var(--ink-soft); font-size: 11px; font-weight: 720; transition: background 160ms ease, color 160ms ease, transform 160ms ease; }
.calendar-day:active { transform: scale(0.92); }
.calendar-day.is-outside { color: #c4c3b3; opacity: 0.55; }
.calendar-day.is-rest::after { content: ""; position: absolute; bottom: 4px; width: 3px; height: 3px; border-radius: 50%; background: #b6c6aa; }
.calendar-day.has-work { color: #3e4b32; background: rgba(255, 203, 62, 0.2); }
.calendar-day.heat-1 { background: rgba(255, 207, 75, 0.27); }
.calendar-day.heat-2 { background: rgba(255, 179, 47, 0.45); }
.calendar-day.heat-3 { background: rgba(255, 139, 31, 0.62); color: #fff9e9; }
.calendar-day.heat-4 { background: #e86e1d; color: #fff9e9; }
.calendar-day.is-today { box-shadow: inset 0 0 0 1.5px var(--ink); }
.calendar-day.is-selected { background: var(--ink); color: #fff8df; box-shadow: 0 7px 14px rgba(40, 51, 37, 0.18); }
.calendar-day.is-selected::after { background: var(--mango-light); }
.heat-legend { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 9px; color: var(--muted); font-size: 8px; font-weight: 650; }
.heat-legend i { width: 9px; height: 9px; border-radius: 3px; background: rgba(255, 207, 75, 0.27); }
.heat-legend i:nth-of-type(2) { background: rgba(255, 179, 47, 0.45); }
.heat-legend i:nth-of-type(3) { background: rgba(255, 139, 31, 0.62); }
.heat-legend i:nth-of-type(4) { background: #e86e1d; }
.rest-legend { display: flex; align-items: center; gap: 3px; margin-left: 5px; }
.rest-legend b { width: 4px; height: 4px; border-radius: 50%; background: #b6c6aa; }
.day-detail { margin-top: 17px; }
.day-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; padding: 0 3px; }
.day-summary h2 { font-size: 18px; }
.day-summary span { color: var(--muted); font-size: 10px; font-weight: 680; }
.day-total { display: grid; justify-items: end; }
.day-total strong { color: var(--mango-deep); font-size: 18px; font-weight: 840; line-height: 1; }
.day-total small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.metrics-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.metric-card { display: grid; align-content: space-between; min-height: 101px; padding: 14px; border: 1px solid rgba(255, 255, 255, 0.72); border-radius: 21px; background: rgba(255, 255, 255, 0.67); box-shadow: var(--shadow-sm); }
.metric-card > span { color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: 0.08em; }
.metric-card strong { margin-top: 7px; font-size: 21px; line-height: 1.05; font-weight: 830; letter-spacing: -0.05em; }
.metric-card strong b { font-size: 28px; }
.metric-card small { margin-top: 7px; color: var(--muted); font-size: 9px; font-weight: 650; }
.metric-main { border-color: transparent; background: linear-gradient(145deg, #ffd965, #ffb33e); color: #3d300e; box-shadow: 0 13px 26px rgba(233, 151, 32, 0.15); }
.metric-main > span, .metric-main small { color: rgba(64, 48, 11, 0.64); }
.metric-type { font-size: 22px !important; }
.chart-card { margin-top: 17px; padding: 17px 15px; border: 1px solid rgba(255, 255, 255, 0.8); border-radius: var(--radius-lg); background: rgba(255, 255, 255, 0.68); box-shadow: var(--shadow-sm); }
.chart-card .section-heading { margin-bottom: 14px; }
.bar-chart { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); align-items: end; gap: 7px; height: 154px; padding: 8px 0 0; }
.bar-col { display: grid; grid-template-rows: 1fr auto auto; align-items: end; justify-items: center; gap: 5px; height: 100%; }
.bar-value { color: var(--muted); font-size: 8px; font-weight: 720; opacity: 0; transition: opacity 160ms ease; }
.bar-col:hover .bar-value { opacity: 1; }
.bar-track { position: relative; display: flex; align-items: flex-end; justify-content: center; width: 23px; height: 100%; border-radius: 9px; background: #f4eedf; overflow: hidden; }
.bar-fill { width: 100%; min-height: 5px; border-radius: 9px; background: linear-gradient(180deg, #ffd35c, #ff9e24); transform-origin: bottom; animation: bar-grow 620ms cubic-bezier(0.2, 0.8, 0.3, 1) both; }
@keyframes bar-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.bar-col.is-today .bar-track { background: #fff1ce; box-shadow: inset 0 0 0 1px rgba(255, 157, 31, 0.2); }
.bar-col.is-today .bar-label { color: var(--mango-deep); font-weight: 800; }
.bar-label { color: var(--muted); font-size: 8px; font-weight: 650; }
.week-goals { display: grid; gap: 12px; }
.week-goal-row { display: grid; grid-template-columns: 46px 1fr 44px; align-items: center; gap: 9px; }
.week-goal-row > span { color: var(--muted); font-size: 9px; font-weight: 700; }
.week-goal-row > b { color: var(--ink-soft); font-size: 9px; text-align: right; }
.goal-track { height: 9px; overflow: hidden; border-radius: 99px; background: #f1ecdf; }
.goal-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ffd65c, #ff9d1f); transition: width 500ms ease; }
.week-goal-row.is-current > span { color: var(--ink); font-weight: 800; }
.week-goal-row.is-current .goal-fill { background: linear-gradient(90deg, #a9cc67, #3f7f4c); }
.type-bars { display: grid; gap: 11px; }
.type-row { display: grid; grid-template-columns: 74px 1fr 34px; align-items: center; gap: 9px; }
.type-name { display: flex; align-items: center; gap: 6px; color: var(--ink-soft); font-size: 10px; font-weight: 720; }
.type-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--type-color, var(--mango)); }
.type-track { height: 7px; overflow: hidden; border-radius: 99px; background: #f3eee2; }
.type-fill { height: 100%; border-radius: inherit; background: var(--type-color, var(--mango)); animation: type-grow 500ms ease both; }
@keyframes type-grow { from { width: 0 !important; } }
.type-row > b { color: var(--muted); font-size: 8px; text-align: right; }
.profile-card { position: relative; display: flex; align-items: center; gap: 14px; overflow: hidden; padding: 19px; border-radius: var(--radius-xl); background: linear-gradient(135deg, #fff0bf, #ffd266); box-shadow: 0 17px 34px rgba(226, 156, 30, 0.15); }
.profile-card::after { content: ""; position: absolute; width: 150px; height: 150px; right: -80px; top: -70px; border: 1px solid rgba(255, 255, 255, 0.34); border-radius: 50%; }
.profile-avatar { display: grid; place-items: center; flex: 0 0 auto; width: 72px; height: 72px; border: 2px solid rgba(255, 255, 255, 0.65); border-radius: 25px; background: rgba(255, 255, 255, 0.36); box-shadow: 0 8px 22px rgba(150, 94, 10, 0.1); }
.profile-avatar svg { width: 56px; height: 56px; }
.profile-copy { min-width: 0; }
.profile-title { font-size: 20px; font-weight: 850; letter-spacing: -0.04em; }
.profile-meta { margin-top: 3px; color: rgba(66, 50, 13, 0.65); font-size: 10px; font-weight: 650; }
.profile-chip { display: inline-flex; align-items: center; gap: 4px; margin-top: 9px; padding: 4px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.4); color: #4d642f; font-size: 9px; font-weight: 750; }
.profile-chip svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2; }
.settings-card { margin-top: 15px; padding: 17px; border: 1px solid rgba(255, 255, 255, 0.78); border-radius: var(--radius-lg); background: rgba(255, 255, 255, 0.69); box-shadow: var(--shadow-sm); }
.settings-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.settings-title h2 { font-size: 18px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); }
.setting-row.stacked { align-items: stretch; flex-direction: column; gap: 10px; }
.setting-copy { display: grid; gap: 3px; }
.setting-copy strong { color: var(--ink-soft); font-size: 12px; font-weight: 780; }
.setting-copy span { color: var(--muted); font-size: 9px; font-weight: 620; }
.segmented { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; padding: 4px; border-radius: 14px; background: #f2eee4; }
.segmented button { min-height: 32px; padding: 0 7px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); font-size: 10px; font-weight: 720; }
.segmented button.is-selected { background: var(--ink); color: #fff9e9; box-shadow: 0 4px 10px rgba(41, 52, 37, 0.14); }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 16px; }
.stepper strong { min-width: 34px; color: var(--ink-soft); font-size: 11px; text-align: center; }
.stepper b { font-size: 14px; }
.switch { position: relative; display: inline-flex; flex: 0 0 auto; width: 46px; height: 27px; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: #dcd9cf; transition: background 180ms ease; }
.switch span::after { content: ""; position: absolute; width: 21px; height: 21px; left: 3px; top: 3px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(35, 42, 28, 0.16); transition: transform 180ms ease; }
.switch input:checked + span { background: var(--leaf); }
.switch input:checked + span::after { transform: translateX(19px); }
.time-field { display: flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--muted); }
.time-field svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.time-field input { width: 75px; border: 0; outline: 0; background: transparent; color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.rest-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.rest-days button { aspect-ratio: 1; padding: 0; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--muted); font-size: 10px; font-weight: 720; }
.rest-days button.is-selected { border-color: transparent; background: var(--leaf-wash); color: var(--leaf-deep); box-shadow: inset 0 0 0 1px rgba(63, 127, 76, 0.12); }
.server-dot { display: inline-flex; align-items: center; gap: 4px; color: var(--leaf); font-size: 9px; font-weight: 750; }
.server-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #6eb15f; box-shadow: 0 0 0 3px rgba(110, 177, 95, 0.12); }
.server-dot.small { font-size: 8px; }
.data-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.data-actions > button, .file-action { display: flex; align-items: center; gap: 9px; padding: 11px; border: 1px solid var(--line); border-radius: 16px; background: #fff; text-align: left; }
.file-action { cursor: pointer; }
.action-icon { display: grid; place-items: center; flex: 0 0 auto; width: 31px; height: 31px; border-radius: 10px; background: var(--mango-wash); color: var(--mango-deep); }
.action-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.data-actions strong, .data-actions small { display: block; }
.data-actions strong { font-size: 10px; font-weight: 780; }
.data-actions small { margin-top: 1px; color: var(--muted); font-size: 8px; }
.file-action input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.server-card { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding: 12px; border-radius: 16px; background: var(--leaf-wash); }
.server-card > div { display: grid; gap: 2px; }
.server-card strong { color: var(--leaf-deep); font-size: 10px; font-weight: 780; }
.server-card small { color: #6f8164; font-size: 8px; }
.coming-badge { flex: 0 0 auto; padding: 4px 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.7); color: var(--leaf); font-size: 8px; font-weight: 750; }
.danger-actions { display: flex; justify-content: space-between; margin-top: 9px; padding: 0 2px; }
.text-button.danger { color: var(--rose); }
.about-card { display: flex; gap: 14px; margin-top: 15px; padding: 17px; border-radius: var(--radius-lg); background: #2e3d2d; color: #f8f5e7; }
.about-mango { display: grid; place-items: center; flex: 0 0 auto; width: 47px; height: 47px; border-radius: 16px; background: rgba(255, 255, 255, 0.1); font-size: 25px; }
.about-card div:last-child { display: grid; gap: 3px; }
.about-card strong { font-size: 12px; font-weight: 780; }
.about-card p { color: rgba(247, 244, 230, 0.69); font-size: 9px; line-height: 1.5; }
.about-card span { color: #c9d59e; font-size: 8px; font-weight: 680; }
.sheet-layer { position: fixed; z-index: 60; inset: 0; display: flex; align-items: flex-end; justify-content: center; visibility: hidden; }
.sheet-layer.is-open { visibility: visible; }
.sheet-backdrop { position: absolute; inset: 0; padding: 0; border: 0; background: rgba(32, 38, 27, 0.42); backdrop-filter: blur(3px); opacity: 0; transition: opacity 220ms ease; }
.sheet-layer.is-open .sheet-backdrop { opacity: 1; }
.log-sheet { position: relative; z-index: 1; width: min(100%, 460px); max-height: 92dvh; overflow-y: auto; padding: 9px 20px calc(18px + env(safe-area-inset-bottom)); border-radius: 30px 30px 0 0; background: #fffaf0; box-shadow: 0 -20px 60px rgba(30, 39, 27, 0.24); transform: translateY(105%); transition: transform 320ms cubic-bezier(0.18, 0.8, 0.26, 1); overscroll-behavior: contain; }
.sheet-layer.is-open .log-sheet { transform: translateY(0); }
.log-sheet::-webkit-scrollbar { display: none; }
.sheet-handle { width: 37px; height: 4px; margin: 0 auto 13px; border-radius: 99px; background: #d8d3c5; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 17px; }
.sheet-head h2 { font-size: 24px; }
.field-label { margin-bottom: 7px; color: var(--ink-soft); font-size: 10px; font-weight: 790; letter-spacing: 0.04em; }
.activity-picker { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.activity-picker button { display: grid; place-items: center; gap: 5px; min-height: 65px; padding: 7px 3px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, 0.72); color: var(--muted); font-size: 9px; font-weight: 720; transition: transform 150ms ease, background 150ms ease, border-color 150ms ease; }
.activity-picker button:active { transform: scale(0.95); }
.activity-picker svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.activity-picker button.is-selected { border-color: rgba(255, 157, 31, 0.35); background: var(--mango-wash); color: var(--mango-deep); box-shadow: inset 0 0 0 1px rgba(255, 157, 31, 0.1); }
.form-grid { display: grid; grid-template-columns: 1.03fr 1fr; gap: 12px; margin-top: 16px; }
.duration-card { display: flex; align-items: center; justify-content: space-between; height: 54px; padding: 5px; border: 1px solid var(--line); border-radius: 17px; background: #fff; }
.duration-step { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 12px; background: #f5f0e5; font-size: 18px; }
.duration-card label { display: flex; align-items: baseline; gap: 3px; }
.duration-card input { width: 48px; padding: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 25px; font-weight: 850; text-align: right; -moz-appearance: textfield; }
.duration-card input::-webkit-outer-spin-button, .duration-card input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.duration-card span { color: var(--muted); font-size: 9px; font-weight: 700; }
.duration-presets { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-top: 7px; }
.duration-presets button { min-height: 29px; padding: 0; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--muted); font-size: 9px; font-weight: 680; }
.duration-presets button.is-selected { border-color: transparent; background: var(--ink); color: #fff9e9; }
.intensity-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 15px; background: #f1ece2; }
.intensity-picker button { min-height: 45px; padding: 0 4px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); font-size: 9px; font-weight: 720; }
.intensity-picker button.is-selected { background: #fff; color: var(--ink); box-shadow: 0 4px 10px rgba(69, 57, 27, 0.08); }
.date-field { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; padding: 0 9px; min-height: 34px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.date-field label { color: var(--muted); font-size: 9px; font-weight: 700; }
.date-field input { width: 112px; padding: 0; border: 0; outline: 0; background: transparent; color: var(--ink-soft); font-size: 9px; font-weight: 650; }
.note-field { display: grid; gap: 6px; margin-top: 14px; }
.note-field > span { color: var(--ink-soft); font-size: 10px; font-weight: 790; }
.note-field small { color: var(--muted); font-weight: 600; }
.note-field input { width: 100%; height: 43px; padding: 0 12px; border: 1px solid var(--line); border-radius: 13px; outline: 0; background: #fff; color: var(--ink); font-size: 11px; }
.note-field input:focus, .time-field:focus-within, .date-field:focus-within { border-color: rgba(255, 157, 31, 0.5); box-shadow: 0 0 0 3px rgba(255, 157, 31, 0.08); }
.log-preview { display: flex; align-items: center; gap: 7px; margin-top: 13px; padding: 10px 12px; border-radius: 13px; background: var(--leaf-wash); color: var(--leaf-deep); }
.log-preview span { font-size: 9px; font-weight: 700; }
.log-preview strong { margin-left: auto; font-size: 15px; font-weight: 850; }
.log-preview small { color: #718269; font-size: 8px; }
.save-button { margin-top: 12px; min-height: 52px; background: var(--mango-deep); box-shadow: 0 12px 24px rgba(224, 104, 20, 0.2); }
.toast { position: fixed; z-index: 90; left: 50%; bottom: calc(var(--nav-height) + var(--safe-bottom) + 15px); display: flex; align-items: center; gap: 8px; max-width: calc(100% - 34px); padding: 10px 15px; border-radius: 99px; background: rgba(35, 48, 34, 0.94); color: #fff8e6; box-shadow: 0 12px 28px rgba(35, 48, 34, 0.24); font-size: 10px; font-weight: 700; opacity: 0; transform: translate(-50%, 14px) scale(0.96); pointer-events: none; transition: opacity 180ms ease, transform 220ms ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0) scale(1); }
.toast-icon { font-size: 14px; }
.confetti-layer { position: fixed; z-index: 80; inset: 0; overflow: hidden; pointer-events: none; }
.confetti { position: absolute; width: 7px; height: 12px; border-radius: 2px; animation: confetti-fall 900ms cubic-bezier(0.16, 0.7, 0.3, 1) forwards; }
@keyframes confetti-fall { 0% { opacity: 1; transform: translate3d(0, -10px, 0) rotate(0deg); } 100% { opacity: 0; transform: translate3d(var(--drift), 220px, 0) rotate(var(--spin)); } }
@media (min-width: 600px) {
  body { display: grid; place-items: center; padding: 12px; }
  .app-shell { height: min(920px, calc(100dvh - 24px)); border: 1px solid rgba(74, 68, 45, 0.12); border-radius: 38px; box-shadow: 0 28px 80px rgba(65, 52, 21, 0.17); }
  .bottom-nav { border-radius: 0 0 38px 38px; }
  .view { padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 385px) {
  .view { padding-left: 14px; padding-right: 14px; }
  .hero-card { padding-left: 14px; padding-right: 14px; }
  .week-strip { gap: 1px; padding: 4px; }
  .week-day { width: 20px; }
  .ring-wrap { transform: scale(0.94); margin-top: -3px; margin-bottom: -4px; }
  .stat-card { gap: 6px; padding: 10px 7px; }
  .stat-icon { width: 26px; height: 26px; }
  .quick-item { padding: 11px; column-gap: 8px; }
  .quick-icon { width: 35px; height: 35px; }
  .form-grid { grid-template-columns: 1fr; }
  .activity-picker { grid-template-columns: repeat(4, 1fr); }
}
@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; }
}

/* Readability and first-pass polish */
.stat-card span { font-size: 10px; line-height: 1.25; }
.soft-label { font-size: 11px; }
.quick-item small { font-size: 10px; }
.record-main p { font-size: 10px; }
.record-side span { font-size: 10px; }
.mango-note p { font-size: 14px; }
.nav-item span { font-size: 10px; }
.calendar-toolbar span { font-size: 10px; }
.weekday-row { font-size: 10px; margin-bottom: 6px; }
.calendar-day { font-size: 12px; min-height: 39px; }
.heat-legend { font-size: 9px; }
.day-summary span, .day-total small { font-size: 10px; }
.metric-card { min-height: 108px; }
.metric-card > span { font-size: 10px; }
.metric-card small { font-size: 10px; line-height: 1.3; }
.bar-value, .bar-label { font-size: 9px; }
.bar-chart { height: 162px; }
.week-goal-row { grid-template-columns: 50px 1fr 50px; }
.week-goal-row > span, .week-goal-row > b { font-size: 10px; }
.type-row { grid-template-columns: 78px 1fr 38px; }
.type-name { font-size: 11px; }
.type-row > b { font-size: 9px; }
.setting-copy strong { font-size: 13px; }
.setting-copy span { font-size: 10px; line-height: 1.45; }
.segmented button { font-size: 11px; }
.rest-days button { font-size: 11px; }
.data-actions strong { font-size: 11px; }
.data-actions small { font-size: 9px; }
.server-card strong { font-size: 11px; }
.server-card small { font-size: 9px; line-height: 1.45; }
.about-card p { font-size: 10px; }
.activity-picker button { font-size: 10px; }
.intensity-picker button { font-size: 10px; }
.duration-presets button { font-size: 10px; }
.note-field > span { font-size: 11px; }
.note-field input { font-size: 12px; }
.log-preview span, .log-preview small { font-size: 9px; }

/* Server sync */
.sync-card { margin-top: 10px; }
.sync-config-toggle { border: 0; cursor: pointer; }
.sync-settings { display: grid; gap: 9px; margin-top: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 17px; background: rgba(255, 255, 255, 0.66); }
.sync-settings[hidden] { display: none; }
.sync-field { display: grid; gap: 5px; }
.sync-field span { color: var(--muted); font-size: 9px; font-weight: 720; }
.sync-field input { width: 100%; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 11px; outline: 0; background: #fff; color: var(--ink); font-size: 11px; }
.sync-field input:focus { border-color: rgba(255, 157, 31, 0.5); box-shadow: 0 0 0 3px rgba(255, 157, 31, 0.08); }
.sync-auto-row { display: flex; align-items: center; justify-content: space-between; color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.sync-settings-actions { display: flex; align-items: center; justify-content: space-between; }
.sync-save-button { min-height: 32px; padding: 0 13px; border: 0; border-radius: 10px; background: var(--ink); color: #fff9e9; font-size: 10px; font-weight: 760; }
.sync-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 10px; }
.sync-actions button { display: flex; align-items: center; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 15px; background: #fff; text-align: left; }
.sync-actions strong, .sync-actions small { display: block; }
.sync-actions strong { font-size: 10px; font-weight: 780; }
.sync-actions small { margin-top: 1px; color: var(--muted); font-size: 8px; }
.sync-last { margin-top: 8px; padding: 0 3px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.sync-last.is-ok { color: var(--leaf); }
.sync-last.is-error { color: var(--rose); }
.server-dot.is-connected::before { background: #49a65b; box-shadow: 0 0 0 3px rgba(73, 166, 91, 0.14); }
.server-dot.is-error::before { background: var(--rose); box-shadow: 0 0 0 3px rgba(232, 101, 82, 0.14); }
