/* CalMate design prototype — light, soft, premium calorie UI */

:root {
  --bg: #f4f5fb;
  --bg-soft: #eef0f8;
  --surface: #ffffff;
  --ink: #1a1d2e;
  --muted: #8b90a5;
  --line: #eceef5;
  --coral: #ff7a59;
  --coral-deep: #ff5c7a;
  --coral-soft: #ffe8e0;
  --orange: #ff9a6b;
  --protein: #ff6b8a;
  --carbs: #ff9f43;
  --fats: #5b9dff;
  --steps: #7c6cff;
  --water: #4fc3f7;
  --success: #3dd68c;
  --shadow: 0 12px 40px rgba(26, 29, 46, 0.08);
  --shadow-sm: 0 4px 16px rgba(26, 29, 46, 0.06);
  --radius: 24px;
  --radius-sm: 16px;
  --phone-w: 390px;
  --phone-h: 844px;
  --tab-h: 84px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Inter", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, #ffe8df 0%, transparent 50%),
    radial-gradient(900px 500px at 100% 0%, #e8ebff 0%, transparent 45%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
  border: none;
  background: none;
  color: inherit;
}

button {
  cursor: pointer;
}

/* ---------- Stage ---------- */

.stage {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.stage-header {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 36px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 8px;
}

.stage-header h1 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.sub {
  margin-top: 10px;
  max-width: 420px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.stage-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.25s var(--ease);
  box-shadow: var(--shadow-sm);
}

.pill:hover {
  color: var(--ink);
  transform: translateY(-1px);
}

.pill.active {
  background: linear-gradient(135deg, var(--coral), var(--coral-deep));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 24px rgba(255, 92, 122, 0.35);
}

.phone-row {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Phone shell ---------- */

.phone {
  width: var(--phone-w);
  height: var(--phone-h);
  background: #0b0c10;
  border-radius: 48px;
  padding: 12px;
  box-shadow:
    0 40px 80px rgba(26, 29, 46, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  position: relative;
  flex-shrink: 0;
}

.phone-notch {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 28px;
  background: #0b0c10;
  border-radius: 20px;
  z-index: 20;
}

.status-bar {
  position: absolute;
  top: 18px;
  left: 28px;
  right: 28px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  z-index: 15;
  pointer-events: none;
}

.status-icons {
  display: flex;
  gap: 6px;
  align-items: center;
  color: var(--ink);
  opacity: 0.9;
}

.status-icons svg {
  display: block;
}

.screen-stack {
  width: 100%;
  height: 100%;
  border-radius: 38px;
  overflow: hidden;
  background: var(--bg);
  position: relative;
}

.screen {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.985);
  transition:
    opacity 0.4s var(--ease),
    transform 0.45s var(--ease);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.screen.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  z-index: 2;
}

.screen-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.diary-bg {
  background:
    radial-gradient(ellipse 80% 40% at 0% 100%, rgba(255, 180, 120, 0.25), transparent 60%),
    radial-gradient(ellipse 60% 35% at 100% 90%, rgba(180, 220, 160, 0.2), transparent 55%),
    linear-gradient(180deg, #fbfcfe 0%, #f4f5fb 40%, #f7f4f1 100%);
}

.screen-content {
  position: relative;
  z-index: 1;
  flex: 1;
  overflow-y: auto;
  padding: 56px 18px calc(var(--tab-h) + 16px);
  scrollbar-width: none;
}

.screen-content::-webkit-scrollbar {
  display: none;
}

.hero-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-bottom: 16px;
  color: var(--ink);
}

.hero-title.compact {
  font-size: 28px;
  margin-bottom: 12px;
}

/* ---------- Cards ---------- */

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.card.soft {
  box-shadow: var(--shadow-sm);
}

.hero-card {
  background: linear-gradient(165deg, #ff9b72 0%, #ff7a59 42%, #ff6b7a 100%);
  color: #fff;
  border: none;
  padding: 14px 16px 18px;
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22), transparent 70%);
  pointer-events: none;
}

.day-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 14px;
  font-weight: 600;
  opacity: 0.95;
  margin-bottom: 4px;
}

.day-nav .icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: grid;
  place-items: center;
  font-size: 18px;
  line-height: 1;
  transition: background 0.2s;
}

.day-nav .icon-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ---------- Calorie ring ---------- */

.calorie-ring-wrap {
  position: relative;
  width: 220px;
  height: 200px;
  margin: 4px auto 10px;
}

.calorie-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.22);
  stroke-width: 14;
}

.ring-progress {
  fill: none;
  stroke: url(#ringGrad);
  stroke: #fff;
  stroke-width: 14;
  stroke-linecap: round;
  stroke-dasharray: 490;
  stroke-dashoffset: 490;
  transition: stroke-dashoffset 1.2s var(--ease);
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.35));
}

.ring-progress.ready {
  stroke-dashoffset: calc(490 - 490 * var(--progress, 0.66));
}

.ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.ring-value {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  animation: count-pop 0.6s var(--ease) both;
}

.ring-label {
  font-size: 13px;
  font-weight: 500;
  opacity: 0.9;
  margin-top: 4px;
}

.ring-stat {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  text-align: center;
}

.ring-stat.left {
  left: -6px;
}

.ring-stat.right {
  right: -6px;
}

.ring-stat-val {
  font-size: 15px;
  font-weight: 700;
}

.ring-stat-lab {
  font-size: 11px;
  opacity: 0.85;
}

/* Macros on gradient card */

.macro-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 4px;
}

.macro-top {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  opacity: 0.95;
  margin-bottom: 6px;
}

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

.dot.carbs {
  background: #ffd28a;
}

.dot.protein {
  background: #ffb0c0;
}

.dot.fats {
  background: #a8cfff;
}

.macro-bar {
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.22);
  overflow: hidden;
}

.macro-fill {
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: #fff;
  transition: width 1s var(--ease) 0.2s;
}

.hero-card.ready .macro-fill {
  width: var(--p);
}

.macro-nums {
  margin-top: 5px;
  font-size: 11px;
  font-weight: 600;
  opacity: 0.9;
}

.mini-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.mini-card {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  border-radius: 16px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.mini-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.25);
  font-size: 14px;
}

.mini-label {
  font-size: 11px;
  opacity: 0.9;
}

.mini-val {
  font-size: 12px;
  font-weight: 700;
}

.mini-val.dim {
  color: var(--muted);
  font-weight: 500;
}

.plus-btn {
  margin-left: auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  color: var(--coral);
  font-size: 18px;
  font-weight: 600;
  display: grid;
  place-items: center;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s var(--ease);
}

.plus-btn:active {
  transform: scale(0.9);
}

.plus-btn.large {
  width: 48px;
  height: 48px;
  font-size: 28px;
  background: linear-gradient(135deg, var(--coral), var(--coral-deep));
  color: #fff;
  margin: 16px auto 0;
  display: grid;
}

/* ---------- Journal ---------- */

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 4px 10px;
}

.section-head h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.meal-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.meal-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border-radius: 18px;
  padding: 10px 12px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
}

.meal-row:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.meal-row:active {
  transform: scale(0.98);
}

.meal-thumb {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  flex-shrink: 0;
}

.meal-thumb.salmon {
  background:
    radial-gradient(circle at 30% 30%, #ffb088, transparent 50%),
    linear-gradient(135deg, #f4a261, #e76f51);
}

.meal-thumb.sausage {
  background:
    radial-gradient(circle at 70% 40%, #ffe08a, transparent 45%),
    linear-gradient(135deg, #e9c46a, #d4a373);
}

.meal-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.meal-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.meal-time {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
}

/* ---------- CTA ---------- */

.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 52px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  margin-top: 16px;
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
}

.cta.primary {
  background: linear-gradient(135deg, #ff7a70, #ff5c7a);
  color: #fff;
  box-shadow: 0 10px 28px rgba(255, 92, 122, 0.35);
}

.cta.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(255, 92, 122, 0.42);
}

.cta.primary:active {
  transform: scale(0.98);
}

.cta.ghost {
  background: transparent;
  color: var(--muted);
  height: 44px;
  margin-top: 6px;
}

.cta-plus {
  font-size: 20px;
  line-height: 1;
}

.pulse-soft {
  animation: soft-pulse 2.4s ease-in-out infinite;
}

/* ---------- Tab bar ---------- */

.tabbar {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  height: var(--tab-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border-radius: 28px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  padding: 8px 6px 14px;
  z-index: 30;
  box-shadow: 0 -4px 30px rgba(26, 29, 46, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.2s;
  padding-bottom: 2px;
}

.tab .tab-icon {
  font-size: 16px;
  line-height: 1;
  opacity: 0.7;
}

.tab.active {
  color: var(--coral-deep);
}

.tab.active .tab-icon {
  opacity: 1;
}

.fab-tab {
  position: relative;
  top: -18px;
}

.fab {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ff8a70, #ff5c7a);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 400;
  box-shadow: 0 10px 24px rgba(255, 92, 122, 0.4);
  transition: transform 0.25s var(--ease);
}

.fab-tab:hover .fab {
  transform: scale(1.06) rotate(90deg);
}

/* ---------- Chat / Meal plan ---------- */

.chat-screen {
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--tab-h) + 8px);
}

.chat-scroll {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 12px;
  scrollbar-width: none;
}

.chat-scroll::-webkit-scrollbar {
  display: none;
}

.chat-user {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff9a6b, #ff5c7a);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.chat-name {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.badge-ai {
  color: var(--coral);
  font-size: 12px;
}

.chat-status {
  font-weight: 500;
  color: var(--muted);
  font-size: 11px;
}

.bubble {
  background: var(--surface);
  border-radius: 18px;
  padding: 12px 14px;
  font-size: 13.5px;
  line-height: 1.45;
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  max-width: 100%;
}

.bubble.user {
  background: linear-gradient(135deg, #ff8a78, #ff6b7a);
  color: #fff;
  border-bottom-left-radius: 6px;
}

.bubble.bot {
  margin-bottom: 10px;
  border-bottom-left-radius: 6px;
}

.bubble.bot strong {
  font-weight: 700;
}

.plan-stats {
  margin-top: 10px;
  display: grid;
  gap: 4px;
  font-size: 13px;
  color: var(--muted);
}

.plan-stats strong {
  color: var(--ink);
}

.meal-plan-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.plan-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--surface);
  border-radius: 18px;
  padding: 12px;
  box-shadow: var(--shadow-sm);
}

.plan-thumb {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  flex-shrink: 0;
}

.plan-thumb.oat {
  background: linear-gradient(135deg, #f5e6c8, #e8c48a);
}

.plan-thumb.snack {
  background: linear-gradient(135deg, #d4e8ff, #a8cfff);
}

.plan-thumb.lunch {
  background: linear-gradient(135deg, #d8f3dc, #95d5b2);
}

.plan-thumb.snack2 {
  background: linear-gradient(135deg, #ffe8a3, #f4c95f);
}

.plan-meal {
  font-size: 13px;
  font-weight: 700;
}

.plan-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  margin-top: 2px;
}

.plan-kcal {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--coral-deep);
  white-space: nowrap;
}

.composer {
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--surface);
  border-radius: 999px;
  padding: 6px 6px 6px 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  margin-top: 8px;
}

.composer input {
  flex: 1;
  min-width: 0;
  height: 40px;
  outline: none;
  font-size: 14px;
}

.composer input::placeholder {
  color: var(--muted);
}

.send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--coral), var(--coral-deep));
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 16px rgba(255, 92, 122, 0.35);
  transition: transform 0.2s var(--ease);
}

.send-btn:active {
  transform: scale(0.92);
}

/* ---------- Scan ---------- */

.scan-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #111;
  color: #fff;
  padding: 52px 16px calc(var(--tab-h) + 12px);
}

.scan-header {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  margin-bottom: 14px;
  font-weight: 600;
  font-size: 15px;
  text-align: center;
}

.ghost-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
  font-size: 14px;
  color: inherit;
}

.scan-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}

.scan-photo {
  flex: 1;
  border-radius: 28px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 40% 40%, #c45c26 0%, transparent 40%),
    radial-gradient(circle at 60% 55%, #8b3a1a 0%, transparent 35%),
    linear-gradient(160deg, #f0d5a8 0%, #d4793a 40%, #5c2a14 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  min-height: 280px;
}

.scan-photo::after {
  content: "";
  position: absolute;
  inset: 18% 12% 22%;
  border-radius: 50% 50% 40% 40%;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(255, 240, 200, 0.35), transparent 50%),
    repeating-linear-gradient(
      95deg,
      transparent 0 8px,
      rgba(255, 255, 255, 0.06) 8px 10px
    );
  opacity: 0.9;
  pointer-events: none;
}

.scan-frame {
  position: absolute;
  inset: 16%;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 24px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.15);
  pointer-events: none;
}

.scan-laser {
  position: absolute;
  left: 16%;
  right: 16%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ff7a59, #fff, #ff7a59, transparent);
  box-shadow: 0 0 12px #ff7a59;
  animation: scan-laser 2.2s ease-in-out infinite;
  z-index: 2;
}

.scan-tag {
  position: absolute;
  left: var(--x);
  top: var(--y);
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  z-index: 3;
  animation: tag-pop 0.5s var(--ease) both;
  animation-delay: 0.4s;
}

.scan-estimate {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 14px 16px;
  backdrop-filter: blur(10px);
}

.scan-estimate-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

.scan-estimate-name {
  font-size: 17px;
  font-weight: 700;
  margin-top: 4px;
}

.scan-estimate-kcal {
  font-size: 13px;
  opacity: 0.8;
  margin-top: 4px;
}

.scan-tools {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 14px 0 10px;
}

.tool {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  padding: 8px 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.2s;
}

.tool:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.shutter {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 4px auto 0;
  border: 4px solid rgba(255, 255, 255, 0.85);
  display: grid;
  place-items: center;
  transition: transform 0.15s;
}

.shutter span {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s;
}

.shutter:active {
  transform: scale(0.94);
}

.shutter:active span {
  transform: scale(0.9);
}

.shutter.flash span {
  animation: shutter-flash 0.35s ease;
}

/* ---------- Fasting ---------- */

.fasting-screen {
  text-align: center;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.sheet-head h2 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.sheet-head .ghost-close {
  background: var(--bg-soft);
  color: var(--ink);
}

.fast-plan-chip {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  background: var(--surface);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--muted);
  box-shadow: var(--shadow-sm);
  margin: 8px auto 20px;
}

.fast-plan-chip strong {
  color: var(--ink);
}

.fast-clock-wrap {
  position: relative;
  width: 240px;
  height: 240px;
  margin: 0 auto 20px;
}

.fast-clock {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.fast-track {
  fill: none;
  stroke: #e8ebf4;
  stroke-width: 12;
}

.fast-progress {
  fill: none;
  stroke: url(#ringGrad);
  stroke: #5b9dff;
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 603;
  stroke-dashoffset: 603;
  transition: stroke-dashoffset 1.2s var(--ease);
  filter: drop-shadow(0 0 8px rgba(91, 157, 255, 0.4));
}

.fast-progress.ready {
  stroke-dashoffset: calc(603 - 603 * var(--progress, 0.58));
}

.fast-ticks {
  transform: rotate(90deg);
  transform-origin: 120px 120px;
  fill: var(--muted);
  font-size: 12px;
  font-family: var(--font);
  font-weight: 600;
}

.fast-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.fast-moon {
  font-size: 22px;
  color: #5b9dff;
  margin-bottom: 4px;
  animation: float-y 3s ease-in-out infinite;
}

.fast-status {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.fast-timer {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

.fast-windows {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 8px;
}

.fast-win {
  background: var(--surface);
  border-radius: 18px;
  padding: 14px 12px;
  box-shadow: var(--shadow-sm);
  text-align: left;
}

.win-lab {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.win-lab .moon {
  color: #5b9dff;
}

.win-lab .sun {
  color: #ff9f43;
}

.win-time {
  font-size: 22px;
  font-weight: 800;
  margin-top: 6px;
  letter-spacing: -0.02em;
}

/* ---------- Water ---------- */

.water-hero {
  text-align: center;
  padding: 28px 20px;
  background: linear-gradient(165deg, #e8f7ff 0%, #ffffff 55%);
  position: relative;
  overflow: hidden;
}

.water-hero::before {
  content: "";
  position: absolute;
  bottom: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 160%;
  height: 70%;
  background: radial-gradient(ellipse at center, rgba(79, 195, 247, 0.18), transparent 65%);
  animation: water-wave 4s ease-in-out infinite;
  pointer-events: none;
}

.water-amount {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -0.04em;
  position: relative;
}

.water-amount span {
  font-size: 18px;
  font-weight: 600;
  color: var(--muted);
}

.water-goal {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
  position: relative;
}

.cups {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  position: relative;
  flex-wrap: wrap;
}

.cup {
  width: 36px;
  height: 44px;
  border-radius: 8px 8px 12px 12px;
  border: 2px solid #b3e5fc;
  background: rgba(255, 255, 255, 0.6);
  position: relative;
  overflow: hidden;
  transition: transform 0.25s var(--ease);
  cursor: pointer;
}

.cup::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0%;
  background: linear-gradient(180deg, #81d4fa, #29b6f6);
  transition: height 0.4s var(--ease);
  border-radius: 0 0 8px 8px;
}

.cup.filled::after {
  height: 100%;
}

.cup:hover {
  transform: translateY(-3px);
}

.cup.pop {
  animation: cup-pop 0.4s var(--ease);
}

.inline-fast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pill-cta {
  background: linear-gradient(135deg, var(--coral), var(--coral-deep));
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(255, 92, 122, 0.3);
}

.water-log {
  background: var(--surface);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.water-log-row {
  display: flex;
  justify-content: space-between;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid var(--line);
}

.water-log-row:last-child {
  border-bottom: none;
}

.water-log-row span:last-child {
  color: var(--water);
  font-weight: 700;
}

/* ---------- Feature rail ---------- */

.feature-rail {
  display: grid;
  gap: 14px;
  width: min(320px, 100%);
  padding-top: 20px;
}

.feature-card {
  background: var(--surface);
  border-radius: 20px;
  padding: 18px 18px 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.fc-icon {
  font-size: 22px;
  margin-bottom: 8px;
}

.feature-card h3 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.feature-card p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

/* ---------- Animations ---------- */

.animate-in {
  animation: rise-in 0.55s var(--ease) both;
}

.delay-1 {
  animation-delay: 0.08s;
}
.delay-2 {
  animation-delay: 0.16s;
}
.delay-3 {
  animation-delay: 0.24s;
}
.delay-4 {
  animation-delay: 0.32s;
}
.delay-5 {
  animation-delay: 0.4s;
}
.delay-6 {
  animation-delay: 0.48s;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes count-pop {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes soft-pulse {
  0%,
  100% {
    box-shadow: 0 10px 28px rgba(255, 92, 122, 0.35);
  }
  50% {
    box-shadow: 0 12px 36px rgba(255, 92, 122, 0.5);
  }
}

@keyframes scan-laser {
  0%,
  100% {
    top: 20%;
    opacity: 0.4;
  }
  50% {
    top: 72%;
    opacity: 1;
  }
}

@keyframes tag-pop {
  from {
    opacity: 0;
    transform: scale(0.7);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes shutter-flash {
  0% {
    background: #fff;
  }
  40% {
    background: #ff7a59;
  }
  100% {
    background: #fff;
  }
}

@keyframes float-y {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

@keyframes water-wave {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-8px);
  }
}

@keyframes cup-pop {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
  }
}

/* Splash toast */
.toast {
  position: absolute;
  left: 50%;
  bottom: calc(var(--tab-h) + 28px);
  transform: translateX(-50%) translateY(12px);
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  z-index: 40;
  transition: all 0.35s var(--ease);
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 860px) {
  .feature-rail {
    width: 100%;
    grid-template-columns: 1fr 1fr;
  }

  .stage-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  .stage {
    padding: 20px 12px 40px;
  }

  .feature-rail {
    grid-template-columns: 1fr;
  }

  .phone {
    width: min(var(--phone-w), 100%);
    height: min(var(--phone-h), 92vh);
  }
}
