@charset "UTF-8";

/* ===== CSS Custom Properties & Reset ===== */
*{box-sizing:border-box;margin:0;padding:0}
:root{
  /* Brand Blue Scale */
  --blue-50:#eff6ff;--blue-100:#dbeafe;--blue-200:#bfdbfe;--blue-300:#93bbfd;
  --blue-400:#609af8;--blue-500:#3b82f6;--blue-600:#2563eb;--blue-700:#1d4ed8;
  /* Teal / Cyan */
  --cyan-200:#a5f3fc;--cyan-300:#67e8f9;--cyan-400:#22d3ee;
  /* Neutral Gray */
  --gray-50:#f9fafb;--gray-100:#f3f4f6;--gray-200:#e5e7eb;--gray-400:#9ca3af;
  --gray-500:#6b7280;--gray-700:#374151;--gray-800:#1f2937;--gray-900:#111827;
  /* Semantic aliases */
  --ink:var(--gray-800);
  --muted:#7b8ba3;
  --line:#e4ecf7;
  --blue:#4f8df7;
  --blue2:#7abfff;
  --cyan:#86edf7;
  --mint:#79e0c7;
  /* Glass layers */
  --card:rgba(255,255,255,.78);
  --glass:rgba(255,255,255,.62);
  --glass-border:rgba(255,255,255,.55);
  /* Shadow layers */
  --shadow-sm:0 2px 8px rgba(74,126,196,.06);
  --shadow-md:0 8px 30px rgba(74,126,196,.1);
  --shadow-lg:0 22px 70px rgba(74,126,196,.14);
  --shadow-xl:0 32px 90px rgba(74,126,196,.18);
  --shadow-glow:0 0 40px rgba(119,220,255,.22);
  /* Spacing */
  --sp-xs:4px;--sp-sm:8px;--sp-md:16px;--sp-lg:24px;--sp-xl:32px;
  /* Typography */
  --text-xs:11px;--text-sm:13px;--text-base:16px;--text-lg:20px;--text-xl:28px;--text-2xl:36px;--text-3xl:48px;
  /* Radii */
  --r-sm:10px;--r-md:18px;--r-lg:26px;--r-xl:34px;--r-full:9999px;
  /* Easing */
  --ease-out:cubic-bezier(.16,1,.3,1);
  --ease-spring:cubic-bezier(.34,1.56,.64,1);
  --ease-smooth:cubic-bezier(.4,0,.2,1);
}

/* ===== Base ===== */
html,body{min-height:100%}
body{
  font-family:"SF Pro Display",-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans SC","PingFang SC",Arial,sans-serif;
  color:var(--ink);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  text-rendering:optimizeLegibility;
  font-variant-numeric:tabular-nums;
  background:
    radial-gradient(ellipse 80% 50% at 20% 5%, rgba(186,218,255,.42), transparent 38%),
    radial-gradient(ellipse 60% 40% at 85% 15%, rgba(200,236,255,.5), transparent 35%),
    radial-gradient(ellipse 50% 60% at 50% 90%, rgba(134,237,247,.1), transparent 40%),
    linear-gradient(155deg,#f8fbff 0%,#eef6ff 45%,#f5f9ff 100%);
  display:flex;
  justify-content:center;
}
button,input{font:inherit}
button{border:0;cursor:pointer}

/* ===== App Shell ===== */
.app{
  width:min(100vw,430px);
  height:100vh;
  position:relative;
  overflow:hidden;
  display:flex;flex-direction:column;
  padding:var(--sp-md) var(--sp-lg) 82px;
  isolation:isolate;
}
.app:before{
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(120deg,rgba(255,255,255,.84),rgba(255,255,255,.2) 45%,rgba(255,255,255,.64)),
    radial-gradient(circle at 50% 20%, rgba(200,230,255,.28), transparent 40%),
    radial-gradient(circle at 50% 58%, rgba(134,237,247,.18), transparent 34%);
  z-index:-2;
}
/* Subtle grain texture overlay */
.app:after{
  content:"";
  position:absolute;inset:0;pointer-events:none;z-index:-1;opacity:.028;
  background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ===== Pages ===== */
.page{flex:1;min-height:0;display:flex;flex-direction:column;overflow-y:auto;overflow-x:hidden}
.page[hidden]{display:none}

/* ===== Stats Page ===== */
.stats-head{margin-bottom:var(--sp-md)}
.stats-head h1{font-size:34px;font-weight:900;color:var(--gray-900);letter-spacing:-.02em}
.calendar-card{
  flex-shrink:0;
  background:linear-gradient(135deg,rgba(255,255,255,.84) 0%,rgba(255,255,255,.68) 50%,rgba(255,255,255,.78) 100%);
  border:1px solid rgba(255,255,255,.65);
  border-radius:var(--r-lg);
  padding:var(--sp-md);
  box-shadow:0 2px 12px rgba(74,126,196,.05),0 8px 32px rgba(74,126,196,.09),inset 0 1px 0 rgba(255,255,255,.9);
  backdrop-filter:blur(28px);-webkit-backdrop-filter:blur(28px);
}
.cal-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--sp-sm)}
.cal-title{font-size:17px;font-weight:800;color:var(--gray-800)}
.cal-nav{width:32px;height:32px;border-radius:50%;background:rgba(255,255,255,.7);color:var(--gray-700);font-size:20px;font-weight:700;display:grid;place-items:center;transition:background .2s ease}
.cal-nav:hover{background:rgba(79,141,247,.12)}
.cal-nav:active{transform:scale(.9)}
.cal-weekdays{display:grid;grid-template-columns:repeat(7,1fr);text-align:center;font-size:12px;font-weight:700;color:var(--muted);margin-bottom:6px}
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}
.cal-day{
  aspect-ratio:1;display:flex;flex-direction:column;align-items:center;justify-content:center;
  border-radius:12px;font-size:14px;font-weight:700;color:var(--gray-700);
  cursor:pointer;transition:background .15s ease;
  position:relative;
}
.cal-day:hover{background:rgba(79,141,247,.08)}
.cal-day.today{background:rgba(79,141,247,.12);color:var(--blue);font-weight:900}
.cal-day.selected{background:var(--blue);color:#fff}
.cal-day.other-month{color:var(--gray-400);opacity:.5}
.cal-day .cal-amount{font-size:9px;font-weight:600;color:var(--blue);margin-top:1px;line-height:1}
.cal-day.selected .cal-amount{color:rgba(255,255,255,.85)}

.day-records{margin-top:var(--sp-md);flex:1;display:flex;flex-direction:column;min-height:0}
.day-records-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:var(--sp-sm);flex-shrink:0}
.day-records-date{font-size:17px;font-weight:800;color:var(--gray-800)}
.day-records-total{font-size:15px;font-weight:700;color:var(--blue)}
.day-records-list{display:flex;flex-direction:column;gap:8px;flex:1;overflow-y:auto;min-height:80px}
.record-item{
  display:flex;align-items:center;justify-content:space-between;
  padding:12px 16px;border-radius:var(--r-md);
  background:linear-gradient(135deg,rgba(255,255,255,.78),rgba(255,255,255,.58));
  border:1px solid rgba(255,255,255,.6);
  box-shadow:0 1px 4px rgba(74,126,196,.04);backdrop-filter:blur(16px);
}
.record-item-time{font-size:13px;font-weight:700;color:var(--muted)}
.record-item-amount{font-size:17px;font-weight:900;color:var(--blue)}
.day-records-empty{font-size:14px;color:var(--muted);font-weight:600;text-align:center;padding:32px 0}

/* ===== Status Bar ===== */
.statusbar{
  height:32px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  font-weight:800;
  font-size:15px;
  color:var(--gray-900);
  margin-bottom:var(--sp-lg);
}
.phone-icons{display:flex;gap:7px;align-items:center}
.signal{display:flex;gap:2px;align-items:flex-end;height:15px}
.signal span{width:4px;border-radius:var(--r-full);background:var(--gray-700)}
.signal span:nth-child(1){height:5px}.signal span:nth-child(2){height:8px}.signal span:nth-child(3){height:12px}.signal span:nth-child(4){height:15px}
.wifi{width:18px;height:14px;border:4px solid var(--gray-700);border-left-color:transparent;border-right-color:transparent;border-bottom:0;border-radius:20px 20px 0 0}
.battery{width:26px;height:13px;border:2px solid var(--gray-700);border-radius:4px;position:relative}
.battery:before{content:"";position:absolute;right:-5px;top:3px;width:3px;height:5px;background:var(--gray-700);border-radius:0 2px 2px 0}
.battery:after{content:"";position:absolute;inset:2px 4px 2px 2px;background:var(--gray-700);border-radius:2px}

/* ===== Hero Header ===== */
.hero-head{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:var(--sp-md)}
.title h1{font-size:38px;line-height:1.02;font-weight:900;letter-spacing:-.02em;color:var(--gray-900)}
.drop-accent{
  display:inline-block;width:10px;height:20px;border-radius:10px 10px 10px 2px;
  background:linear-gradient(160deg,#58a2ff,#a7e7ff);
  transform:rotate(-24deg);margin-left:2px;
  box-shadow:0 0 14px rgba(88,162,255,.35);
  animation:accentPulse 2.4s ease-in-out infinite;
}
@keyframes accentPulse{
  0%,100%{box-shadow:0 0 14px rgba(88,162,255,.35)}
  50%{box-shadow:0 0 22px rgba(88,162,255,.55)}
}
.title p{color:var(--muted);font-size:17px;font-weight:600;margin-top:14px;letter-spacing:.01em}
.title-line{width:23px;height:3px;background:var(--blue);border-radius:4px;margin-top:var(--sp-sm)}
.top-actions{display:flex;gap:14px;margin-top:var(--sp-sm)}

/* ===== Pill Group (shared by top-actions & picker) ===== */
.pill-group{
  display:flex;align-items:center;
  background-color:#fff;
  box-shadow:0 0 1px 0 rgba(24,94,224,.15),0 6px 12px 0 rgba(24,94,224,.15);
  padding:4px;border-radius:99px;gap:2px;
}
.pill-btn{
  display:flex;align-items:center;justify-content:center;gap:6px;
  min-height:34px;padding:4px 16px;
  border-radius:99px;cursor:pointer;
  color:var(--gray-500);font-size:13px;font-weight:700;
  background:transparent;
  transition:color .15s ease-in,background .2s ease;
}
.pill-btn svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
.pill-btn.active{
  color:#185ee0;
  background-color:#e6eef9;
}
.pill-btn:active{transform:scale(.94);transition:transform .1s ease}

.top-actions{display:flex;gap:14px;margin-top:var(--sp-sm)}

/* ===== Goal Card ===== */
.goal-card{
  background:linear-gradient(135deg,rgba(255,255,255,.84) 0%,rgba(255,255,255,.68) 50%,rgba(255,255,255,.78) 100%);
  border:1px solid rgba(255,255,255,.65);
  border-radius:var(--r-lg);
  padding:var(--sp-md) var(--sp-md) 14px;
  box-shadow:
    0 2px 12px rgba(74,126,196,.05),
    0 8px 32px rgba(74,126,196,.09),
    0 24px 64px rgba(74,126,196,.12),
    inset 0 1px 0 rgba(255,255,255,.9),
    inset 0 -1px 0 rgba(200,220,240,.12);
  backdrop-filter:blur(28px);-webkit-backdrop-filter:blur(28px);
  position:relative;
  z-index:4;
}
.goal-grid{display:grid;grid-template-columns:1fr 1px 116px;gap:17px;align-items:center}
.goal-label{font-size:var(--text-base);color:var(--gray-500);font-weight:700;margin-bottom:4px;letter-spacing:.02em}
.amount{display:flex;align-items:flex-end;gap:8px}
.amount strong{font-size:36px;line-height:.98;color:var(--blue);font-weight:900;font-variant-numeric:tabular-nums}
.amount span{font-size:17px;color:var(--muted);font-weight:600;margin-bottom:7px}
.goal-editable{cursor:pointer;border-radius:8px;padding:2px 6px;transition:background .2s ease}
.goal-editable:hover{background:rgba(79,141,247,.1)}
.goal-input{width:70px;font-size:17px;font-weight:600;color:var(--blue);background:rgba(79,141,247,.08);border:1px solid var(--blue-300);border-radius:8px;padding:2px 6px;outline:none;text-align:center;font-variant-numeric:tabular-nums}
.divider{
  width:1px;height:54px;
  background:linear-gradient(to bottom,transparent 0%,rgba(200,215,235,.4) 20%,rgba(180,200,225,.6) 50%,rgba(200,215,235,.4) 80%,transparent 100%);
}
.remain{display:grid;grid-template-columns:30px 1fr;gap:10px;align-items:center;color:var(--gray-500);font-weight:700;line-height:1.35}
.mini-cup{width:30px;height:42px;border:2px solid rgba(212,223,235,.6);border-radius:9px;position:relative;background:rgba(249,252,255,.8);overflow:hidden;box-shadow:inset 0 0 4px rgba(100,174,234,.1)}
.mini-cup:after{content:"";position:absolute;left:4px;right:4px;bottom:4px;height:24px;background:linear-gradient(180deg,rgba(155,216,255,.9),rgba(100,174,250,.85));border-radius:4px 4px 6px 6px;box-shadow:inset 0 -2px 4px rgba(80,150,230,.2)}
.remain strong{font-size:var(--text-base);color:var(--gray-800)}

/* ===== Progress ===== */
.progress-row{margin-top:var(--sp-md);position:relative}
.progress-track{height:10px;border-radius:var(--r-md);background:var(--line);overflow:hidden;position:relative}
.progress-fill{
  height:100%;width:60%;border-radius:inherit;
  background:linear-gradient(90deg,var(--blue-400),var(--blue-600));
  transition:width .7s var(--ease-out);
  position:relative;overflow:hidden;
}
.progress-fill:after{
  content:"";position:absolute;inset:0;
  background:linear-gradient(90deg,transparent 0%,rgba(255,255,255,.22) 45%,rgba(255,255,255,.32) 50%,rgba(255,255,255,.22) 55%,transparent 100%);
  animation:shimmer 2.4s ease-in-out infinite;
}
@keyframes shimmer{0%{transform:translateX(-100%)}100%{transform:translateX(100%)}}
.progress-badge{
  position:absolute;top:14px;left:calc(60% - 22px);
  min-width:44px;height:30px;padding:0 10px;border-radius:13px;
  background:linear-gradient(135deg,var(--blue-400),var(--blue-600));
  color:#fff;font-size:var(--text-base);font-weight:800;display:grid;place-items:center;
  text-shadow:0 1px 2px rgba(0,0,0,.12);
  box-shadow:
    0 2px 6px rgba(74,141,247,.15),
    0 10px 22px rgba(74,141,247,.28),
    0 0 0 1px rgba(255,255,255,.12) inset;
  transition:left .7s var(--ease-out);
}
.progress-badge:after{content:"";position:absolute;left:50%;top:-8px;transform:translateX(-50%);border:5px solid transparent;border-bottom-color:var(--blue-600)}
.progress-badge.celebrate{animation:badgePop .5s var(--ease-spring)}
@keyframes badgePop{0%{transform:scale(1)}40%{transform:scale(1.18)}100%{transform:scale(1)}}

/* ===== Stage & Cup ===== */
.stage{
  position:relative;
  flex:1;min-height:0;
  margin-top:var(--sp-sm);
  overflow:hidden;
}
/* Ambient light orb behind cup */
.stage:before{
  content:"";position:absolute;left:50%;top:30%;width:280px;height:280px;
  transform:translate(-50%,-50%);
  background:radial-gradient(circle,rgba(134,237,247,.14) 0%,transparent 65%);
  pointer-events:none;z-index:0;
  animation:ambientPulse 4.2s ease-in-out infinite;
}
@keyframes ambientPulse{
  0%,100%{opacity:.6;transform:translate(-50%,-50%) scale(1)}
  50%{opacity:1;transform:translate(-50%,-50%) scale(1.06)}
}
.cup-wrap{
  position:absolute;
  left:50%;
  top:0;bottom:54px;
  width:clamp(260px,72vw,320px);
  transform:translateX(-50%);
}
.cup-wrap.bump{animation:cupBump .58s var(--ease-out)}
@keyframes cupBump{
  0%,100%{transform:translateX(-50%) scale(1)}
  28%{transform:translateX(-50%) scale(1.035) translateY(-5px)}
  52%{transform:translateX(-50%) scale(.99) translateY(2px)}
}
.cup-viewport{
  position:absolute;
  inset:0;
  overflow:visible;
  border-radius:var(--r-xl);
}
/* Glass reflection sweep on cup */
.cup-viewport:before{
  content:"";position:absolute;inset:0;z-index:5;pointer-events:none;border-radius:inherit;
  background:linear-gradient(135deg,rgba(255,255,255,.12) 0%,transparent 40%,transparent 60%,rgba(255,255,255,.06) 100%);
}
.cup-viewport.bg-issue .cup-img{
  box-shadow:0 0 0 3px rgba(226,91,106,.42),0 16px 38px rgba(226,91,106,.18);
}
.cup-viewport.bg-issue:after{
  content:"背景异常";
  position:absolute;
  left:50%;
  top:14px;
  transform:translateX(-50%);
  z-index:8;
  padding:5px 11px;
  border-radius:var(--r-full);
  background:rgba(255,255,255,.9);
  color:#e25b6a;
  font-size:12px;
  font-weight:800;
  box-shadow:0 10px 24px rgba(226,91,106,.18);
}
.cup-img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
  filter:drop-shadow(0 28px 30px rgba(82,133,185,.18));
  z-index:1;
  opacity:0;
  transition:box-shadow .3s var(--ease-out),filter .3s var(--ease-out),transform .3s var(--ease-out),opacity .4s var(--ease-out);
}
.cup-img[src]:not([src=""]){opacity:1}

/* ===== Wave Animations (unused by water element, kept for reference) ===== */
@keyframes wave{
  0%,100%{transform:translateX(-6px) rotate(-1.2deg)}
  50%{transform:translateX(7px) rotate(1.2deg)}
}
@keyframes wave2{
  0%,100%{transform:translateX(5px) rotate(.8deg)}
  50%{transform:translateX(-8px) rotate(-.8deg)}
}

/* ===== AI Chip ===== */
.ai-chip{
  position:absolute;
  left:50%;top:50%;
  transform:translate(-50%,-50%);
  min-width:210px;
  height:48px;
  border-radius:25px;
  background-image:linear-gradient(30deg,#0400ff,#4ce3f7);background-size:100% auto;
  display:flex;align-items:center;justify-content:center;gap:10px;
  color:#fff;
  font-size:var(--text-base);font-weight:800;
  z-index:8;
  transition:transform .22s var(--ease-spring),background-position .4s ease,opacity .3s ease;
}
.ai-chip.hidden{opacity:0;pointer-events:none}
.ai-chip:hover{
  transform:translate(-50%,-50%) translateY(-2px);
  background-position:right center;background-size:200% auto;
  animation:pulse512 1.5s infinite;
}
.ai-chip:active{transform:translate(-50%,-50%) scale(.96);transition:transform .1s ease}
.ai-chip.error{color:#e25b6a}
.ai-chip.loading{display:none}
.ai-chip svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:2.7;stroke-linecap:round;stroke-linejoin:round}

/* ===== AI Loading Animation ===== */
.ai-loader{
  position:absolute;
  left:50%;top:50%;
  transform:translate(-50%,-50%);
  display:flex;align-items:center;justify-content:center;
  width:140px;height:140px;
  z-index:8;
}
.ai-loader .loader-ring{
  position:absolute;inset:0;
  border-radius:50%;
  animation:loaderRotate 2s linear infinite;
}
@keyframes loaderRotate{
  0%{transform:rotate(90deg);box-shadow:0 8px 16px 0 rgba(255,255,255,.95) inset,0 16px 24px 0 rgba(76,227,247,.92) inset,0 48px 48px 0 rgba(79,141,247,.88) inset}
  50%{transform:rotate(270deg);box-shadow:0 8px 16px 0 rgba(255,255,255,.95) inset,0 16px 10px 0 rgba(96,154,248,.94) inset,0 32px 48px 0 rgba(37,99,235,.9) inset}
  100%{transform:rotate(450deg);box-shadow:0 8px 16px 0 rgba(255,255,255,.95) inset,0 16px 24px 0 rgba(76,227,247,.92) inset,0 48px 48px 0 rgba(79,141,247,.88) inset}
}
.ai-loader .loader-letters{
  display:flex;gap:1px;z-index:1;
  font-size:14px;font-weight:700;color:var(--blue);
}
.ai-loader .loader-letter{
  display:inline-block;opacity:.3;
  animation:loaderLetter 2s infinite;
}
.ai-loader .loader-letter:nth-child(1){animation-delay:0s}
.ai-loader .loader-letter:nth-child(2){animation-delay:.1s}
.ai-loader .loader-letter:nth-child(3){animation-delay:.2s}
.ai-loader .loader-letter:nth-child(4){animation-delay:.3s}
.ai-loader .loader-letter:nth-child(5){animation-delay:.4s}
.ai-loader .loader-letter:nth-child(6){animation-delay:.5s}
.ai-loader .loader-letter:nth-child(7){animation-delay:.6s}
@keyframes loaderLetter{
  0%,100%{opacity:.3;transform:translateY(0)}
  20%{opacity:1;transform:scale(1.15)}
  40%{opacity:.6;transform:translateY(0)}
}

/* ===== Drink Picker (Wheel) ===== */
.picker{
  margin-top:8px;
}
.picker-row{
  display:flex;align-items:center;gap:8px;
}
.record-btn{
  flex-shrink:0;
  min-height:52px;min-width:48px;
  background-color:#fff;
  box-shadow:0 0 1px 0 rgba(24,94,224,.15),0 4px 8px 0 rgba(24,94,224,.12);
  padding:4px;border-radius:99px;
  transition:background-color .25s ease-out;
}
.record-btn:active{
  background-color:#e6eef9;
}
.wheel-wrap{
  position:relative;width:100%;min-width:0;height:52px;overflow:hidden;
  border-radius:20px;
  background:rgba(255,255,255,.82);
  border:1px solid rgba(200,215,235,.7);
  box-shadow:0 0 1px 0 rgba(24,94,224,.12),0 4px 12px rgba(24,94,224,.1);
}
.wheel-highlight{
  position:absolute;left:50%;top:4px;bottom:4px;width:72px;
  transform:translateX(-50%);z-index:2;pointer-events:none;
  border-left:2px solid rgba(4,0,255,.35);border-right:2px solid rgba(4,0,255,.35);
  background:rgba(76,227,247,.12);
  border-radius:4px;
}
.wheel-highlight:before,.wheel-highlight:after{
  content:"";position:absolute;left:50%;transform:translateX(-50%);
  width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;
}
.wheel-highlight:before{top:2px;border-top:6px solid rgba(4,0,255,.5)}
.wheel-highlight:after{bottom:2px;border-bottom:6px solid rgba(4,0,255,.5)}
.wheel{
  display:flex;align-items:center;
  overflow-x:auto;scroll-snap-type:x mandatory;
  -webkit-overflow-scrolling:touch;
  height:100%;padding:0 calc(50% - 36px);
  scrollbar-width:none;
}
.wheel::-webkit-scrollbar{display:none}
.wheel-item{
  flex:0 0 72px;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  scroll-snap-align:center;
  color:var(--gray-500);font-size:14px;font-weight:700;
  transition:color .15s ease,transform .15s ease;
  user-select:none;
}
.wheel-item.major{color:var(--gray-700);font-size:18px;font-weight:900}
.wheel-item.selected{color:#0400ff;transform:scale(1.08)}
.wheel-item .tick{
  width:1px;height:10px;background:var(--line);margin-top:2px;
}
.wheel-item.major .tick{height:14px;background:rgba(4,0,255,.3)}

@keyframes pulse512{
  0%{box-shadow:0 0 0 0 #05bada66}
  70%{box-shadow:0 0 0 10px rgb(218 103 68 / 0%)}
  100%{box-shadow:0 0 0 0 rgb(218 103 68 / 0%)}
}

/* ===== Profile Page ===== */
.profile-head{
  display:flex;flex-direction:column;align-items:center;
  margin-bottom:var(--sp-lg);padding-top:var(--sp-sm);
}
.profile-avatar{
  width:72px;height:72px;border-radius:50%;
  background:linear-gradient(135deg,var(--blue-300),var(--blue-600));
  display:grid;place-items:center;color:#fff;
  box-shadow:0 4px 16px rgba(79,141,247,.25);
  margin-bottom:var(--sp-sm);
}
.profile-avatar svg{width:36px;height:36px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.profile-name-row{display:flex;align-items:center;gap:6px;cursor:pointer}
.profile-name{font-size:22px;font-weight:800;color:var(--gray-900)}
.profile-edit-icon{width:16px;height:16px;stroke:var(--muted);fill:none;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}

.profile-menu{
  background:linear-gradient(135deg,rgba(255,255,255,.84),rgba(255,255,255,.68));
  border:1px solid rgba(255,255,255,.65);
  border-radius:var(--r-lg);
  box-shadow:0 2px 12px rgba(74,126,196,.05),0 8px 32px rgba(74,126,196,.09),inset 0 1px 0 rgba(255,255,255,.9);
  backdrop-filter:blur(28px);-webkit-backdrop-filter:blur(28px);
  margin-bottom:var(--sp-md);overflow:hidden;
}
.menu-item{
  display:flex;align-items:center;gap:12px;
  padding:14px 16px;cursor:pointer;
  transition:background .15s ease;
}
.menu-item:not(:last-child){border-bottom:1px solid rgba(200,215,235,.25)}
.menu-item:hover{background:rgba(79,141,247,.06)}
.menu-item:active{background:rgba(79,141,247,.1)}
.menu-item span:nth-child(2){flex:1;font-size:15px;font-weight:700;color:var(--gray-800)}
.menu-item.danger span:nth-child(2){color:#e25b6a}
.menu-icon-wrap{
  width:34px;height:34px;border-radius:10px;
  background:rgba(79,141,247,.1);
  display:grid;place-items:center;flex-shrink:0;
}
.menu-icon-wrap svg{width:18px;height:18px;stroke:var(--blue);fill:none;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
.menu-item.danger .menu-icon-wrap{background:rgba(226,91,106,.1)}
.menu-item.danger .menu-icon-wrap svg{stroke:#e25b6a}
.menu-value{font-size:14px;font-weight:700;color:var(--muted);margin-right:4px}
.menu-arrow{color:var(--gray-400);font-size:18px;font-weight:300}

/* Toggle switch */
.toggle-switch{position:relative;width:44px;height:26px;flex-shrink:0}
.toggle-switch input{display:none}
.toggle-slider{
  position:absolute;inset:0;border-radius:26px;
  background:#d1d5db;cursor:pointer;transition:background .2s ease;
}
.toggle-slider:before{
  content:"";position:absolute;left:3px;top:3px;width:20px;height:20px;
  border-radius:50%;background:#fff;
  box-shadow:0 1px 3px rgba(0,0,0,.15);transition:transform .2s ease;
}
.toggle-switch input:checked+.toggle-slider{background:var(--blue)}
.toggle-switch input:checked+.toggle-slider:before{transform:translateX(18px)}

.profile-footer{text-align:center;padding:var(--sp-lg) 0;color:var(--muted);font-size:12px;font-weight:600}

/* ===== Bottom Tabs ===== */
.tabs{
  position:absolute;left:16px;right:16px;bottom:14px;
  display:flex;align-items:center;
  background-color:#fff;
  box-shadow:0 0 1px 0 rgba(24,94,224,.15),0 6px 12px 0 rgba(24,94,224,.15);
  padding:6px;border-radius:99px;
  z-index:10;
}
.tabs *{z-index:2}
.tabs input[type="radio"]{display:none}
.tab{
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  flex:1;height:42px;
  color:var(--gray-500);font-size:11px;font-weight:700;
  border-radius:99px;cursor:pointer;
  transition:color .15s ease-in;
  gap:2px;
}
.tab-ico{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
.tabs input[type="radio"]:checked+.tab{color:#185ee0}
.glider{
  position:absolute;
  display:flex;height:42px;
  width:calc(33.33% - 4px);
  background-color:#e6eef9;
  z-index:1;border-radius:99px;
  transition:.25s ease-out;
  left:6px;
}
.tabs input[id="radio-1"]:checked~.glider{transform:translateX(0)}
.tabs input[id="radio-2"]:checked~.glider{transform:translateX(100%)}
.tabs input[id="radio-3"]:checked~.glider{transform:translateX(200%)}

/* ===== Toast ===== */
.toast{
  position:fixed;
  left:50%;bottom:105px;transform:translateX(-50%) translateY(20px);
  width:min(350px,calc(100vw - 36px));
  padding:13px 16px;border-radius:var(--r-md);
  background:rgba(30,50,90,.88);color:#fff;
  font-size:14px;font-weight:700;text-align:center;opacity:0;pointer-events:none;
  transition:opacity .25s var(--ease-out),transform .25s var(--ease-out);z-index:20;
  backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);
  border:1px solid rgba(255,255,255,.12);
  box-shadow:0 12px 32px rgba(20,34,55,.28),0 0 0 1px rgba(255,255,255,.06);
}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}

/* ===== Bubbles & Splash ===== */
.bubble{
  position:absolute;
  width:10px;height:10px;border-radius:50%;
  background:rgba(139,223,255,.8);
  left:50%;top:58%;
  animation:bubbleUp .95s ease-out forwards;
  z-index:6;
}
@keyframes bubbleUp{
  to{transform:translate(var(--dx),-92px) scale(.35);opacity:0}
}
.splash{
  position:absolute;
  width:5px;height:5px;border-radius:50%;
  background:rgba(120,200,255,.9);
  z-index:7;pointer-events:none;
  animation:splashUp .6s ease-out forwards;
}
@keyframes splashUp{
  0%{transform:translate(0,0) scale(1);opacity:1}
  100%{transform:translate(var(--sx),var(--sy)) scale(.3);opacity:0}
}

/* ===== Responsive: ≤380px ===== */
@media (max-width:380px){
  .app{padding-left:var(--sp-md);padding-right:var(--sp-md)}
  .title h1{font-size:38px}
  .goal-grid{grid-template-columns:1fr;gap:10px}
  .divider,.remain{display:none}
  .progress-row{padding-right:0}
  .stage{height:410px}
  .cup-wrap{width:292px;height:350px;top:14px}
  .picker{left:12px;right:12px;grid-template-columns:50px minmax(0,1fr) 70px;padding:8px}
  .record-btn{font-size:15px}
}
