:root {
  color-scheme: light;
  --bg: #f7f4eb;
  --surface: rgba(255, 251, 243, 0.9);
  --surface-strong: rgba(255, 248, 235, 0.96);
  --surface-ink: rgba(26, 24, 18, 0.86);
  --line: rgba(79, 58, 36, 0.12);
  --line-strong: rgba(79, 58, 36, 0.22);
  --ink: #1f1a15;
  --muted: #6f675f;
  --accent: #1d6b56;
  --accent-strong: #103e31;
  --accent-soft: #dceee8;
  --sun: #ef8a49;
  --rose: #d86e72;
  --gold: #e0b04e;
  --navy: #16324f;
  --shadow: 0 24px 60px rgba(54, 36, 10, 0.14);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(224, 176, 78, 0.24), transparent 28%),
    radial-gradient(circle at bottom right, rgba(29, 107, 86, 0.16), transparent 32%),
    linear-gradient(160deg, #f8f3e6 0%, #efe5d2 52%, #f4ede1 100%);
  color: var(--ink);
  font-family: "Aptos", "Segoe UI Variable", "Microsoft YaHei UI", "PingFang SC", sans-serif;
}

body {
  padding: 24px;
}

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

button {
  border: 0;
  cursor: pointer;
}

.app-shell {
  position: relative;
  display: flex;
  justify-content: center;
}

.ambient {
  position: absolute;
  filter: blur(14px);
  opacity: 0.72;
  pointer-events: none;
}

.ambient-a {
  top: 40px;
  left: calc(50% - 230px);
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(239, 138, 73, 0.16);
}

.ambient-b {
  top: 420px;
  right: calc(50% - 240px);
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(29, 107, 86, 0.18);
}

.phone {
  position: relative;
  width: min(100%, 430px);
  min-height: calc(100vh - 48px);
  padding: 22px 18px 112px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 36px;
  background: linear-gradient(180deg, rgba(255, 252, 244, 0.94), rgba(246, 239, 226, 0.96));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.topbar,
.section-head,
.sheet-head,
.hero-mainline,
.tab-strip,
.metric-grid,
.bottom-nav,
.insight-tags,
.topbar-actions,
.hero-badges,
.flow-actions,
.review-actions,
.sheet-actions,
.goal-toolbar,
.modal-foot {
  display: flex;
}

.topbar,
.section-head,
.sheet-head,
.goal-toolbar {
  align-items: center;
  justify-content: space-between;
}

.topbar {
  gap: 14px;
}

.eyebrow,
.section-kicker,
.hero-label {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.topbar h1,
.section-head h2,
.sheet-head h2,
.modal-card h2 {
  margin: 0;
}

.topbar h1 {
  font-size: 1.9rem;
  font-weight: 800;
}

.topbar-actions {
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.status-pill,
.pill,
.mini-pill,
.chip,
.subtle-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  white-space: nowrap;
}

.status-pill {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--muted);
  font-size: 0.8rem;
}

.ghost-button,
.primary-button,
.danger-button,
.range-button,
.tab-button,
.nav-button,
.energy-option,
.filter-chip,
.preset-button,
.goal-card,
.smart-card {
  transition: transform 160ms ease, opacity 160ms ease, background 160ms ease, border 160ms ease;
}

.ghost-button {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
}

.primary-button,
.danger-button {
  padding: 12px 16px;
  border-radius: 999px;
  color: #f7fff8;
  font-weight: 700;
  box-shadow: 0 14px 24px rgba(29, 107, 86, 0.22);
}

.primary-button {
  background: var(--accent);
}

.danger-button {
  background: var(--rose);
  box-shadow: 0 14px 24px rgba(216, 110, 114, 0.22);
}

.hero-card,
.section-card,
.metric-card,
.chart-card,
.goal-card,
.sheet,
.modal-card,
.smart-card {
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(10px);
}

.hero-card {
  display: grid;
  grid-template-columns: 1.35fr 110px;
  gap: 14px;
  margin-top: 18px;
  padding: 18px;
  border-radius: var(--radius-xl);
}

.hero-mainline {
  flex-direction: column;
  gap: 8px;
}

.hero-mainline strong {
  font-size: 2.5rem;
  line-height: 1;
  letter-spacing: -0.05em;
}

.hero-mainline span,
.hero-summary,
.flow-hint,
.review-tip,
.timeline-meta,
.insight-text,
.smart-card p {
  color: var(--muted);
}

.hero-summary {
  margin: 12px 0 0;
  font-size: 0.95rem;
  line-height: 1.55;
}

.hero-badges {
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.mini-pill {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  font-size: 0.8rem;
}

.hero-ring {
  display: grid;
  place-items: center;
}

.ring-core {
  display: grid;
  place-items: center;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff9ee 0 45px, transparent 45px),
    conic-gradient(var(--accent) 0 62%, rgba(29, 107, 86, 0.14) 62% 100%);
}

.ring-core span {
  font-size: 1.28rem;
  font-weight: 800;
}

.ring-core small {
  color: var(--muted);
}

.tab-strip {
  gap: 8px;
  margin: 18px 0 14px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
}

.tab-button,
.range-button,
.nav-button {
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.tab-button {
  flex: 1;
  padding: 11px 0;
  border-radius: 999px;
}

.range-button {
  padding: 8px 12px;
  border-radius: 999px;
}

.tab-button.is-active,
.range-button.is-active,
.nav-button.is-active {
  background: var(--ink);
  color: #fbf8f1;
}

.view {
  display: none;
  animation: rise 260ms ease;
}

.view.is-active {
  display: block;
}

.metric-grid {
  gap: 12px;
  margin-bottom: 14px;
}

.metric-card,
.section-card {
  border-radius: var(--radius-lg);
}

.metric-card {
  flex: 1;
  padding: 14px 12px;
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}

.metric-card strong {
  margin-top: 6px;
  display: block;
  font-size: 1.4rem;
}

.section-card {
  margin-bottom: 14px;
  padding: 16px;
}

.quick-flow-card {
  background:
    radial-gradient(circle at top right, rgba(29, 107, 86, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(255, 251, 243, 0.92), rgba(244, 239, 230, 0.92));
}

.flow-actions {
  gap: 10px;
  margin-top: 14px;
}

.flow-button {
  flex: 1;
}

.flow-hint {
  margin: 12px 0 0;
  font-size: 0.9rem;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.preset-button {
  padding: 14px 12px;
  border: 1px solid rgba(29, 107, 86, 0.12);
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(214, 239, 228, 0.7), rgba(255, 255, 255, 0.92));
  text-align: left;
}

.preset-button strong,
.timeline-item strong,
.goal-card strong,
.smart-card strong {
  display: block;
  font-size: 0.98rem;
}

.preset-button span,
.timeline-item span,
.goal-card span,
.breakdown-row span,
.action-list li,
.running-timer,
.insight-text,
.smart-card span {
  color: var(--muted);
}

.timeline-head {
  margin-bottom: 14px;
}

.chip-row,
.energy-picker,
.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-row.compact {
  justify-content: flex-end;
}

.filter-chip,
.energy-option,
.chip {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.64);
  color: var(--muted);
}

.filter-chip.is-active,
.energy-option.is-active,
.chip.is-active {
  background: var(--surface-ink);
  color: #fffaf1;
  border-color: rgba(255, 255, 255, 0.2);
}

.timeline-list,
.breakdown-list,
.goal-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.timeline-item,
.goal-card {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.6);
}

.timeline-item {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 10px;
  align-items: center;
}

.timeline-item:hover,
.goal-card:hover,
.smart-card:hover,
.preset-button:hover,
.ghost-button:hover,
.primary-button:hover,
.danger-button:hover,
.range-button:hover,
.tab-button:hover,
.nav-button:hover,
.filter-chip:hover,
.energy-option:hover {
  transform: translateY(-1px);
}

.timeline-badge {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fffdf7;
  font-size: 0.86rem;
  font-weight: 800;
}

.timeline-duration {
  color: var(--ink);
  font-weight: 800;
}

.running-timer {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(29, 107, 86, 0.08);
}

.empty-state {
  padding: 18px 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 20px;
  color: var(--muted);
  text-align: center;
}

.hidden {
  display: none !important;
}

.segmented-control {
  display: flex;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(29, 26, 21, 0.06);
}

.analytics-grid {
  margin-top: 14px;
}

.chart-card {
  margin-top: 14px;
  padding: 16px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(22, 50, 79, 0.06), rgba(255, 255, 255, 0.72));
}

.chart-bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  min-height: 180px;
  align-items: end;
}

.chart-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.chart-bar {
  width: 100%;
  min-height: 16px;
  border-radius: 18px 18px 8px 8px;
  background: linear-gradient(180deg, var(--sun), var(--accent));
}

.chart-column small {
  color: var(--muted);
  font-size: 0.75rem;
}

.breakdown-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(79, 58, 36, 0.08);
}

.breakdown-row:last-child {
  border-bottom: 0;
}

.breakdown-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 700;
}

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

.premium-card {
  background:
    radial-gradient(circle at top right, rgba(224, 176, 78, 0.22), transparent 30%),
    linear-gradient(180deg, rgba(255, 251, 243, 0.92), rgba(255, 244, 224, 0.92));
}

.pill,
.chip,
.subtle-pill {
  font-size: 0.75rem;
}

.pill {
  padding: 7px 10px;
  background: rgba(29, 107, 86, 0.12);
  color: var(--accent-strong);
  font-weight: 700;
}

.subtle-pill {
  padding: 7px 10px;
  background: rgba(22, 50, 79, 0.08);
  color: var(--navy);
}

.insight-text {
  margin: 16px 0 0;
  font-size: 0.98rem;
  line-height: 1.6;
}

.smart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.smart-card {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
}

.smart-card strong {
  margin-top: 8px;
  font-size: 1.15rem;
}

.smart-card p {
  margin: 8px 0 0;
  font-size: 0.88rem;
  line-height: 1.5;
}

.insight-tags {
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.chip.is-locked {
  background: rgba(22, 50, 79, 0.1);
  color: var(--navy);
}

.lock-button {
  cursor: pointer;
}

.paywall-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.paywall-tile {
  padding: 14px 12px;
  border: 1px solid rgba(22, 50, 79, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.64);
  color: var(--ink);
  text-align: left;
}

.paywall-tile strong,
.paywall-tile span {
  display: block;
}

.paywall-tile span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.goal-toolbar {
  margin-top: 14px;
  gap: 10px;
  align-items: flex-start;
}

.goal-card {
  display: grid;
  gap: 12px;
}

.goal-topline,
.goal-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.goal-topline button {
  flex-shrink: 0;
}

.goal-progress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(29, 107, 86, 0.12);
}

.goal-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--accent));
}

.goal-check {
  appearance: none;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(79, 58, 36, 0.2);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  position: relative;
}

.goal-check:checked {
  background: var(--accent);
}

.goal-check:checked::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 7px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.action-list {
  margin: 14px 0 0;
  padding-left: 18px;
}

.action-list li {
  margin-bottom: 8px;
  line-height: 1.55;
}

.review-label {
  display: block;
  margin: 16px 0 8px;
  font-size: 0.9rem;
  font-weight: 700;
}

.review-textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid rgba(79, 58, 36, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  resize: vertical;
}

.review-actions {
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.review-tip {
  font-size: 0.82rem;
  text-align: right;
}

.bottom-nav {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  gap: 10px;
  padding: 10px;
  border-radius: 999px;
  background: rgba(255, 249, 238, 0.96);
  border: 1px solid rgba(79, 58, 36, 0.08);
  box-shadow: 0 14px 36px rgba(54, 36, 10, 0.12);
}

.nav-button {
  flex: 1;
  padding: 12px 0;
  border-radius: 999px;
}

.sheet-backdrop,
.modal-panel {
  position: fixed;
  inset: 0;
}

.sheet-backdrop {
  background: rgba(18, 18, 18, 0.36);
}

.sheet {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: min(100% - 24px, 430px);
  padding: 14px 14px 18px;
  border-radius: 28px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  z-index: 20;
}

.sheet-handle {
  width: 72px;
  height: 5px;
  margin: 4px auto 14px;
  border-radius: 999px;
  background: rgba(79, 58, 36, 0.18);
}

.sheet-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.sheet-form label {
  display: grid;
  gap: 8px;
}

.sheet-form span {
  font-size: 0.9rem;
  font-weight: 700;
}

.sheet-form input,
.sheet-form select,
.sheet-form textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid rgba(79, 58, 36, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.sheet-actions {
  gap: 10px;
  justify-content: space-between;
  margin-top: 4px;
}

.sheet-actions button {
  flex: 1;
}

.submit-button {
  width: 100%;
  justify-content: center;
}

.modal-panel {
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(18, 18, 18, 0.34);
  z-index: 30;
}

.modal-card {
  width: min(100%, 420px);
  padding: 22px;
  border-radius: 28px;
  background: rgba(255, 250, 241, 0.98);
}

.modal-copy {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.chip-grid {
  margin-top: 18px;
}

.modal-foot {
  justify-content: space-between;
  gap: 10px;
  margin-top: 20px;
}

.modal-foot button {
  flex: 1;
}

.modal-stack {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.modal-link {
  display: inline-flex;
  justify-content: center;
  text-decoration: none;
}

.feedback-form,
.launch-settings {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.feedback-form label,
.launch-settings label {
  display: grid;
  gap: 8px;
}

.feedback-form span,
.launch-settings span {
  font-size: 0.88rem;
  font-weight: 700;
}

.feedback-form input,
.feedback-form select,
.feedback-form textarea,
.launch-settings input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(79, 58, 36, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.status-copy {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.privacy-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.privacy-list p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.plan-options {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.plan-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(79, 58, 36, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--ink);
  text-align: left;
}

.plan-option.is-selected {
  border-color: rgba(29, 107, 86, 0.5);
  background: rgba(220, 238, 232, 0.7);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 100px;
  transform: translateX(-50%);
  max-width: min(92vw, 360px);
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(26, 24, 18, 0.9);
  color: #fffaf2;
  z-index: 40;
  box-shadow: 0 16px 28px rgba(26, 24, 18, 0.24);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 520px) {
  body {
    padding: 0;
  }

  .phone {
    width: 100%;
    min-height: 100vh;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    padding-bottom: 120px;
  }

  .hero-card,
  .smart-grid {
    grid-template-columns: 1fr;
  }

  .hero-ring {
    justify-content: start;
  }

  .metric-grid,
  .flow-actions,
  .review-actions,
  .sheet-actions,
  .goal-toolbar,
  .paywall-grid {
    flex-direction: column;
  }

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

  .review-tip {
    text-align: left;
  }
}
