/* =========================================================
   日序 DayFlow — visual system
   ========================================================= */
:root {
  --bg: #efebe2;
  --bg-deep: #e9e3d8;
  --surface: #fffdf8;
  --surface-2: #f8f4ec;
  --surface-3: #f2ede3;
  --ink: #1c2d27;
  --ink-soft: #46544d;
  --muted: #7d857f;
  --faint: #a5ada6;
  --line: rgba(28, 45, 39, 0.11);
  --line-strong: rgba(28, 45, 39, 0.18);
  --forest: #173a31;
  --forest-2: #235346;
  --forest-3: #2c6b54;
  --lime: #d9f28f;
  --lime-deep: #c4e26b;
  --mint: #dcebe0;
  --sand: #f3e2bf;
  --sky: #d9eaf2;
  --peach: #f5d9cc;
  --coral: #dd7b62;
  --danger: #b8594a;
  --white: #ffffff;
  --shadow-sm: 0 3px 12px rgba(24, 55, 46, 0.05);
  --shadow: 0 18px 46px rgba(24, 55, 46, 0.08), 0 2px 7px rgba(24, 55, 46, 0.04);
  --shadow-lg: 0 30px 80px rgba(17, 42, 35, 0.18);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 17px;
  --radius-sm: 12px;
  --font: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, rgba(218, 241, 204, 0.45), transparent 26rem),
    radial-gradient(circle at 90% 15%, rgba(245, 218, 204, 0.38), transparent 23rem),
    var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

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

button {
  cursor: pointer;
}

h1, h2, h3, h4, p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

::selection {
  background: var(--lime);
  color: var(--forest);
}

::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

::-webkit-scrollbar-thumb {
  background: rgba(31, 57, 48, 0.18);
  border: 2px solid transparent;
  border-radius: 10px;
  background-clip: padding-box;
}

::-webkit-scrollbar-track {
  background: transparent;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.ambient {
  position: fixed;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(2px);
  z-index: 0;
}

.ambient-one {
  width: 460px;
  height: 460px;
  left: -200px;
  bottom: -130px;
  background: radial-gradient(circle, rgba(202, 230, 186, 0.28), transparent 68%);
}

.ambient-two {
  width: 520px;
  height: 520px;
  right: -280px;
  top: 32%;
  background: radial-gradient(circle, rgba(244, 207, 191, 0.2), transparent 68%);
}

/* =========================================================
   Shell
   ========================================================= */
.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr);
  width: 100%;
  max-width: 1640px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 14px;
}

.sidebar {
  position: sticky;
  top: 14px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 28px);
  padding: 27px 17px 18px;
  overflow: hidden;
  color: #e6eee7;
  background:
    radial-gradient(circle at 15% 8%, rgba(217, 242, 143, 0.12), transparent 15rem),
    linear-gradient(155deg, #1a3e34 0%, #15322b 54%, #122a24 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 30px;
  box-shadow: 0 24px 50px rgba(18, 42, 35, 0.18);
}

.sidebar::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -95px;
  bottom: 55px;
  border: 1px solid rgba(217, 242, 143, 0.1);
  border-radius: 50%;
  box-shadow: 0 0 0 30px rgba(217, 242, 143, 0.03), 0 0 0 60px rgba(217, 242, 143, 0.02);
  pointer-events: none;
}

.brand {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 2px 10px 28px;
}

.brand-mark {
  position: relative;
  width: 37px;
  height: 37px;
  overflow: hidden;
  background: var(--lime);
  border-radius: 13px;
  box-shadow: 0 7px 18px rgba(217, 242, 143, 0.15);
}

.brand-mark.large {
  width: 46px;
  height: 46px;
  border-radius: 15px;
}

.brand-sun {
  position: absolute;
  width: 15px;
  height: 15px;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--forest);
  border-radius: 50%;
}

.brand-mark.large .brand-sun {
  width: 18px;
  height: 18px;
  top: 10px;
}

.brand-horizon {
  position: absolute;
  left: 7px;
  right: 7px;
  bottom: 10px;
  height: 1.5px;
  background: rgba(23, 58, 49, 0.8);
  box-shadow: 0 -5px 0 -0.2px rgba(23, 58, 49, 0.5);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-text strong {
  font-size: 19px;
  letter-spacing: 2px;
}

.brand-text span {
  margin-top: 6px;
  color: rgba(230, 238, 231, 0.45);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2.4px;
}

.sidebar-close {
  display: none;
  margin-left: auto;
  color: rgba(255, 255, 255, 0.7) !important;
}

.nav-list {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  height: 49px;
  padding: 0 15px;
  color: rgba(230, 238, 231, 0.62);
  font-size: 14px;
  font-weight: 550;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 14px;
  transition: color 0.25s, background 0.25s, transform 0.25s;
}

.nav-item .icon {
  width: 19px;
  height: 19px;
  opacity: 0.9;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(2px);
}

.nav-item.active {
  color: var(--forest);
  font-weight: 700;
  background: var(--lime);
  box-shadow: 0 8px 22px rgba(6, 18, 14, 0.16);
}

.nav-glow {
  position: absolute;
  right: 14px;
  width: 5px;
  height: 5px;
  background: var(--forest);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s;
}

.nav-item.active .nav-glow {
  opacity: 1;
}

.nav-badge {
  min-width: 22px;
  height: 20px;
  margin-left: auto;
  padding: 0 6px;
  color: rgba(230, 238, 231, 0.7);
  font-size: 10px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 20px;
}

.nav-item.active .nav-badge {
  color: var(--forest);
  background: rgba(23, 58, 49, 0.13);
}

.sidebar-spacer {
  flex: 1;
  min-height: 28px;
}

.rhythm-card {
  position: relative;
  z-index: 2;
  padding: 16px 15px 15px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
}

.rhythm-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  color: rgba(230, 238, 231, 0.57);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.7px;
}

.rhythm-card-head .icon {
  width: 14px;
  height: 14px;
  color: var(--lime);
}

.rhythm-times {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rhythm-times > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rhythm-times > div:last-child {
  margin-left: auto;
  text-align: right;
}

.rhythm-times small {
  color: rgba(230, 238, 231, 0.4);
  font-size: 9px;
  letter-spacing: 1px;
}

.rhythm-times strong {
  font-size: 15px;
  font-weight: 650;
}

.rhythm-line {
  width: 24px;
  height: 1px;
  background: rgba(217, 242, 143, 0.3);
}

.rhythm-track {
  height: 3px;
  margin: 13px 0 9px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.rhythm-track span {
  display: block;
  width: 20%;
  height: 100%;
  background: var(--lime);
  border-radius: inherit;
  transition: width 0.6s var(--ease);
}

.rhythm-card p {
  color: rgba(230, 238, 231, 0.43);
  font-size: 10px;
  line-height: 1.45;
}

.sidebar-streak {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 12px 2px;
}

.streak-orb {
  display: grid;
  width: 33px;
  height: 33px;
  color: var(--lime);
  background: rgba(217, 242, 143, 0.1);
  border-radius: 50%;
  place-items: center;
}

.streak-orb .icon {
  width: 15px;
  height: 15px;
}

.sidebar-streak strong {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
}

.sidebar-streak small {
  display: block;
  margin-top: 3px;
  color: rgba(230, 238, 231, 0.36);
  font-size: 9.5px;
}

.sidebar-scrim {
  display: none;
}

.content-shell {
  min-width: 0;
  padding: 0 0 0 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  padding: 0 4px;
}

.topbar-leading,
.topbar-actions {
  display: flex;
  align-items: center;
}

.topbar-leading {
  gap: 12px;
}

.topbar-context {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
}

.topbar-context > span:first-child {
  color: var(--ink-soft);
  font-weight: 650;
}

.context-dot {
  width: 3px;
  height: 3px;
  background: var(--faint);
  border-radius: 50%;
}

.topbar-actions {
  gap: 9px;
}

.live-clock {
  margin-right: 6px;
  color: var(--ink-soft);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  letter-spacing: 0.4px;
}

.icon-btn {
  position: relative;
  display: inline-grid;
  width: 40px;
  height: 40px;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-radius: 50%;
  place-items: center;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.icon-btn:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
}

.icon-btn:active {
  transform: scale(0.94);
}

.icon-btn.bordered {
  width: 38px;
  height: 38px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.icon-btn.subtle {
  width: 30px;
  height: 30px;
  color: var(--muted);
}

.icon-btn .icon {
  width: 18px;
  height: 18px;
}

.notification-btn {
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(28, 45, 39, 0.07);
}

.notification-dot {
  position: absolute;
  top: 9px;
  right: 10px;
  width: 5px;
  height: 5px;
  background: var(--coral);
  border: 1.5px solid var(--surface);
  border-radius: 50%;
}

.notification-btn.enabled .notification-dot {
  background: var(--forest-3);
}

.notification-btn.enabled {
  color: var(--forest-3);
  background: var(--mint);
}

.avatar {
  display: grid;
  width: 40px;
  height: 40px;
  margin-left: 2px;
  color: var(--forest);
  font-size: 13px;
  font-weight: 750;
  background: var(--lime);
  border: 0;
  border-radius: 50%;
  place-items: center;
  box-shadow: 0 4px 12px rgba(20, 50, 40, 0.1);
  transition: transform 0.2s;
}

.avatar:hover {
  transform: rotate(-7deg) scale(1.03);
}

.mobile-menu {
  display: none;
}

.main-content {
  padding-bottom: 20px;
}

.view {
  display: none;
}

.view.active {
  display: block;
  animation: viewIn 0.45s var(--ease);
}

@keyframes viewIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.app-footer {
  display: flex;
  justify-content: space-between;
  padding: 10px 5px 18px;
  color: var(--faint);
  font-size: 10.5px;
  letter-spacing: 0.4px;
}

/* =========================================================
   Buttons & shared elements
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 17px;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 13px;
  transition: transform 0.2s var(--ease), box-shadow 0.2s, background 0.2s, border-color 0.2s;
}

.btn .icon {
  width: 17px;
  height: 17px;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0) scale(0.985);
}

.btn-primary {
  color: var(--surface);
  background: var(--forest);
  box-shadow: 0 9px 23px rgba(23, 58, 49, 0.19);
}

.btn-primary:hover {
  background: var(--forest-2);
  box-shadow: 0 12px 28px rgba(23, 58, 49, 0.24);
}

.btn-lime {
  min-height: 48px;
  padding: 0 22px;
  color: var(--forest);
  background: var(--lime);
  border-color: rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  box-shadow: 0 12px 26px rgba(6, 20, 15, 0.18);
}

.btn-lime:hover {
  background: #e4f9a8;
  box-shadow: 0 15px 30px rgba(6, 20, 15, 0.25);
}

.btn-ghost {
  color: var(--ink-soft);
  background: var(--surface);
  border-color: var(--line);
}

.btn-ghost:hover {
  background: var(--surface-2);
  border-color: var(--line-strong);
}

.btn-ghost-light {
  min-height: 48px;
  color: rgba(255, 255, 255, 0.74);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.13);
  border-radius: 14px;
}

.btn-ghost-light:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.11);
}

.btn-soft {
  color: var(--forest-2);
  background: var(--mint);
  border-color: rgba(23, 58, 49, 0.05);
}

.btn-soft:hover {
  background: #cfe4d5;
}

.btn-danger-ghost {
  color: var(--danger);
  background: rgba(184, 89, 74, 0.05);
  border-color: rgba(184, 89, 74, 0.14);
}

.btn-danger-ghost:hover {
  background: rgba(184, 89, 74, 0.1);
}

.btn.full {
  width: 100%;
}

.btn.large {
  min-height: 49px;
  font-size: 14px;
}

.btn.small {
  min-height: 36px;
  padding: 0 12px;
  font-size: 11.5px;
  border-radius: 10px;
}

.btn.small .icon {
  width: 14px;
  height: 14px;
}

.text-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  color: var(--forest-3);
  font-size: 11px;
  font-weight: 700;
  background: none;
  border: 0;
}

.text-btn:hover {
  color: var(--forest);
}

.text-btn .icon {
  width: 13px;
  height: 13px;
  transition: transform 0.2s;
}

.text-btn:hover .icon {
  transform: translateX(2px);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

.eyebrow.light {
  color: rgba(217, 242, 143, 0.67);
}

.soft-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 23px;
  padding: 0 9px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 650;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  white-space: nowrap;
}

.panel {
  background: rgba(255, 253, 248, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.panel-head h2 {
  font-size: 17px;
  line-height: 1.2;
  letter-spacing: -0.3px;
}

.panel-head p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11.5px;
}

.panel-head.compact {
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.panel-head.compact .eyebrow {
  margin-bottom: 5px;
}

.panel-title-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.pulse-dot {
  position: relative;
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--lime);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(217, 242, 143, 0.12);
}

.pulse-dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border: 1px solid rgba(217, 242, 143, 0.5);
  border-radius: 50%;
  animation: pulse 2.2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.7); opacity: 0.8; }
  70%, 100% { transform: scale(1.55); opacity: 0; }
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  min-height: 272px;
  margin-bottom: 16px;
  overflow: hidden;
  color: var(--surface);
  background:
    radial-gradient(circle at 85% 20%, rgba(217, 242, 143, 0.15), transparent 20rem),
    radial-gradient(circle at 73% 100%, rgba(90, 148, 122, 0.22), transparent 20rem),
    linear-gradient(120deg, #163c31 0%, #1a4035 42%, #13332b 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-xl);
  box-shadow: 0 27px 55px rgba(18, 44, 36, 0.17);
  animation: heroIn 0.8s var(--ease);
}

@keyframes heroIn {
  from { opacity: 0; transform: scale(0.985) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.75fr);
  gap: 36px;
  align-items: center;
  min-height: 272px;
  padding: 34px 42px 32px;
}

.hero-copy {
  min-width: 0;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 15px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 620px;
  font-size: clamp(34px, 3.6vw, 50px);
  font-weight: 620;
  line-height: 1.07;
  letter-spacing: -2.2px;
}

.hero-copy > p {
  max-width: 560px;
  margin-top: 13px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12.5px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 23px;
}

.hero-assumptions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.36);
  font-size: 9.5px;
}

.hero-assumptions span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-assumptions .icon {
  width: 12px;
  height: 12px;
  color: rgba(217, 242, 143, 0.55);
}

.hero-side {
  display: flex;
  align-items: center;
  gap: 23px;
  min-width: 0;
}

.hero-ring-wrap {
  position: relative;
  width: 122px;
  height: 122px;
  flex: none;
}

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

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

.ring-value {
  fill: none;
  stroke: var(--lime);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 314.16;
  stroke-dashoffset: 314.16;
  transition: stroke-dashoffset 0.8s var(--ease);
}

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

.hero-ring-label strong {
  font-size: 24px;
  font-weight: 620;
  letter-spacing: -1px;
}

.hero-ring-label span {
  margin-top: 1px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 8.5px;
  letter-spacing: 0.8px;
}

.energy-chart {
  flex: 1;
  min-width: 145px;
}

.energy-chart-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 9px;
  color: rgba(255, 255, 255, 0.38);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.7px;
}

.energy-chart-head span:last-child {
  color: rgba(217, 242, 143, 0.7);
}

.energy-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 68px;
  padding-bottom: 1px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.energy-bar {
  flex: 1;
  min-width: 3px;
  height: 10%;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 3px 3px 1px 1px;
  transition: height 0.6s var(--ease), background 0.3s;
}

.energy-bar.peak {
  background: var(--lime);
}

.energy-bar.medium {
  background: rgba(217, 242, 143, 0.46);
}

.energy-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.23);
  font-size: 7.5px;
  letter-spacing: 0.6px;
}

.hero-grain {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.5;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to right, transparent 45%, #000);
}

/* =========================================================
   Stats
   ========================================================= */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
  margin-bottom: 16px;
}

.stat-card {
  display: grid;
  grid-template-columns: 39px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 89px;
  padding: 15px 15px 13px;
  background: rgba(255, 253, 248, 0.82);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.24s var(--ease), box-shadow 0.24s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(24, 55, 46, 0.08);
}

.stat-icon {
  display: grid;
  width: 39px;
  height: 39px;
  border-radius: 13px;
  place-items: center;
}

.stat-icon .icon {
  width: 17px;
  height: 17px;
}

.stat-icon.mint { color: var(--forest-3); background: var(--mint); }
.stat-icon.sand { color: #8d682d; background: var(--sand); }
.stat-icon.sky { color: #376b7e; background: var(--sky); }
.stat-icon.peach { color: #a65d49; background: var(--peach); }

.stat-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.stat-body strong {
  overflow: hidden;
  font-size: 22px;
  font-weight: 630;
  line-height: 1.1;
  letter-spacing: -0.8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-body strong em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 550;
  letter-spacing: 0;
}

.stat-body span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.2px;
}

.stat-card > small {
  grid-column: 1 / -1;
  margin-top: -1px;
  overflow: hidden;
  color: var(--faint);
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* =========================================================
   Dashboard
   ========================================================= */
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.68fr) minmax(285px, 0.8fr);
  gap: 16px;
  align-items: start;
}

.timeline-panel {
  min-height: 540px;
  padding: 23px 23px 18px;
}

.timeline-panel .panel-head {
  margin-bottom: 18px;
}

.timeline {
  display: flex;
  flex-direction: column;
}

.timeline-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 390px;
  padding: 30px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 45%, rgba(217, 242, 143, 0.15), transparent 9rem),
    var(--surface-2);
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
}

.empty-orbit {
  display: grid;
  width: 70px;
  height: 70px;
  margin-bottom: 17px;
  color: var(--forest-3);
  background: var(--lime);
  border-radius: 50%;
  place-items: center;
  box-shadow: 0 0 0 12px rgba(217, 242, 143, 0.18), 0 16px 34px rgba(24, 55, 46, 0.1);
}

.empty-orbit .icon {
  width: 25px;
  height: 25px;
}

.timeline-empty h3 {
  font-size: 19px;
  letter-spacing: -0.5px;
}

.timeline-empty p {
  max-width: 330px;
  margin: 7px 0 17px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.65;
}

.timeline-block {
  display: grid;
  grid-template-columns: 57px 22px minmax(0, 1fr);
  gap: 9px;
  min-height: 77px;
}

.timeline-time {
  padding-top: 17px;
  text-align: right;
}

.timeline-time strong {
  display: block;
  color: var(--ink-soft);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.timeline-time small {
  display: block;
  margin-top: 2px;
  color: var(--faint);
  font-size: 8px;
}

.timeline-rail {
  position: relative;
  display: flex;
  justify-content: center;
}

.timeline-rail::before {
  content: "";
  position: absolute;
  top: 23px;
  bottom: -1px;
  width: 1px;
  background: var(--line);
}

.timeline-block:last-child .timeline-rail::before {
  bottom: 50%;
}

.timeline-dot {
  position: relative;
  z-index: 1;
  display: grid;
  width: 21px;
  height: 21px;
  margin-top: 17px;
  color: var(--forest-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 50%;
  place-items: center;
}

.timeline-dot .icon {
  width: 10px;
  height: 10px;
}

.timeline-block.is-current .timeline-dot {
  color: var(--forest);
  background: var(--lime);
  border-color: var(--lime);
  box-shadow: 0 0 0 5px rgba(217, 242, 143, 0.2);
}

.timeline-block.is-done .timeline-dot {
  color: var(--white);
  background: var(--forest-3);
  border-color: var(--forest-3);
}

.timeline-card {
  position: relative;
  align-self: start;
  margin: 8px 0 8px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: 15px;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.timeline-card:hover {
  background: #faf6ee;
  border-color: var(--line);
}

.timeline-block.is-current .timeline-card {
  background: #f5f8ea;
  border-color: rgba(44, 107, 84, 0.28);
  box-shadow: 0 7px 22px rgba(44, 107, 84, 0.07);
}

.timeline-block.is-done .timeline-card {
  background: rgba(248, 244, 236, 0.55);
}

.block-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.block-icon {
  display: grid;
  width: 32px;
  height: 32px;
  flex: none;
  color: var(--forest-3);
  background: var(--mint);
  border-radius: 10px;
  place-items: center;
}

.block-icon .icon {
  width: 15px;
  height: 15px;
}

.block-icon.work { color: #376b7e; background: var(--sky); }
.block-icon.study { color: #6d5a2f; background: var(--sand); }
.block-icon.health,
.block-icon.exercise { color: #8e4f3d; background: var(--peach); }
.block-icon.life { color: var(--forest-3); background: var(--mint); }
.block-icon.break { color: #7c7a72; background: #ede9df; }
.block-icon.meal { color: #8b5a34; background: #f4e5cd; }
.block-icon.routine { color: #4a6a7d; background: #e2edf2; }

.block-main {
  flex: 1;
  min-width: 0;
}

.block-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.block-title {
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}

.timeline-block.is-done .block-title {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: rgba(125, 133, 127, 0.45);
}

.block-tag {
  display: inline-flex;
  align-items: center;
  height: 17px;
  padding: 0 5px;
  color: var(--muted);
  font-size: 7.5px;
  font-weight: 650;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--line);
  border-radius: 4px;
  letter-spacing: 0.2px;
}

.block-tag.must {
  color: #955241;
  background: var(--peach);
  border-color: transparent;
}

.block-tag.current {
  color: var(--forest);
  background: var(--lime);
  border-color: transparent;
}

.block-note {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.45;
}

.block-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: none;
}

.block-check {
  display: grid;
  width: 27px;
  height: 27px;
  color: var(--faint);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  place-items: center;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}

.block-check .icon {
  width: 12px;
  height: 12px;
}

.block-check:hover {
  color: var(--forest-3);
  border-color: var(--forest-3);
  transform: scale(1.04);
}

.timeline-block.is-done .block-check {
  color: var(--white);
  background: var(--forest-3);
  border-color: var(--forest-3);
}

.block-focus {
  display: grid;
  width: 27px;
  height: 27px;
  color: var(--forest-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 50%;
  place-items: center;
}

.block-focus:hover {
  background: var(--mint);
}

.block-focus .icon {
  width: 11px;
  height: 11px;
}

.timeline-block.is-break {
  min-height: 54px;
}

.timeline-block.is-break .timeline-rail::before {
  background: repeating-linear-gradient(to bottom, var(--line) 0 4px, transparent 4px 8px);
}

.timeline-block.is-break .timeline-dot {
  width: 16px;
  height: 16px;
  margin-top: 18px;
  color: var(--faint);
}

.timeline-block.is-break .timeline-dot .icon {
  width: 8px;
  height: 8px;
}

.timeline-block.is-break .timeline-card {
  margin: 10px 0;
  padding: 8px 12px;
  background: transparent;
  border: 1px dashed var(--line);
}

.timeline-block.is-break .block-title {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 550;
}

.timeline-block.is-break .block-note {
  display: none;
}

.timeline-block.is-break .block-icon {
  width: 26px;
  height: 26px;
  background: transparent;
}

.timeline-block.is-break .block-icon .icon {
  width: 12px;
  height: 12px;
}

.timeline-block.is-fixed .timeline-card {
  border-left: 2px solid rgba(44, 107, 84, 0.22);
}

.timeline-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 10px;
  padding: 13px 13px 2px;
  border-top: 1px solid var(--line);
}

.timeline-footer p {
  color: var(--muted);
  font-size: 10px;
}

.unscheduled {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 12px;
  padding: 13px;
  background: rgba(184, 89, 74, 0.045);
  border: 1px dashed rgba(184, 89, 74, 0.22);
  border-radius: 14px;
}

.unscheduled-head {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(184, 89, 74, 0.12);
}

.unscheduled-icon {
  display: grid;
  width: 25px;
  height: 25px;
  flex: none;
  color: var(--danger);
  background: rgba(184, 89, 74, 0.09);
  border-radius: 8px;
  place-items: center;
}

.unscheduled-icon .icon {
  width: 12px;
  height: 12px;
}

.unscheduled-head strong {
  display: block;
  color: var(--danger);
  font-size: 10.5px;
}

.unscheduled-head p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.unscheduled-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 8px;
  background: rgba(255, 253, 248, 0.72);
  border-radius: 9px;
}

.unscheduled-item > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.unscheduled-item strong {
  overflow: hidden;
  font-size: 10px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.unscheduled-item small {
  margin-top: 2px;
  color: var(--faint);
  font-size: 8px;
}

.unscheduled-item .btn {
  flex: none;
  height: 28px;
  font-size: 8.5px;
}

/* Rail */
.rail {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.now-card {
  position: relative;
  overflow: hidden;
  padding: 20px 20px 16px;
  color: var(--surface);
  background:
    radial-gradient(circle at 90% 0%, rgba(217, 242, 143, 0.16), transparent 10rem),
    linear-gradient(145deg, #204a3e, #173830);
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 18px 38px rgba(23, 58, 49, 0.14);
}

.now-card::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  right: -55px;
  bottom: -60px;
  border: 1px solid rgba(217, 242, 143, 0.12);
  border-radius: 50%;
  box-shadow: 0 0 0 20px rgba(217, 242, 143, 0.025);
}

.now-top,
.now-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.live-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(217, 242, 143, 0.67);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 1.5px;
}

.now-time {
  color: rgba(255, 255, 255, 0.35);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.8px;
}

.now-main {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-height: 89px;
  margin: 19px 0 13px;
}

.now-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: none;
  color: var(--forest);
  background: var(--lime);
  border-radius: 12px;
  place-items: center;
}

.now-icon .icon {
  width: 17px;
  height: 17px;
}

.now-main h3 {
  max-width: 210px;
  overflow: hidden;
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: -0.3px;
  text-overflow: ellipsis;
}

.now-main p {
  max-width: 225px;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.43);
  font-size: 10px;
  line-height: 1.5;
}

.now-progress {
  position: relative;
  z-index: 1;
  height: 4px;
  margin-bottom: 11px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.09);
  border-radius: 5px;
}

.now-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--lime);
  border-radius: inherit;
  transition: width 0.6s var(--ease);
}

.now-footer {
  color: rgba(255, 255, 255, 0.37);
  font-size: 9px;
}

.now-footer .text-btn {
  color: rgba(217, 242, 143, 0.85);
}

.now-footer .text-btn:hover {
  color: var(--lime);
}

.now-footer .text-btn .icon {
  width: 12px;
  height: 12px;
}

.ai-card {
  padding: 18px 18px 13px;
}

.ai-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ai-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.ai-orb {
  display: grid;
  width: 31px;
  height: 31px;
  color: var(--forest);
  background: var(--lime);
  border-radius: 10px;
  place-items: center;
}

.ai-orb .icon {
  width: 15px;
  height: 15px;
}

.ai-title h3 {
  font-size: 13px;
  line-height: 1.25;
}

.ai-title span {
  display: block;
  margin-top: 2px;
  color: var(--faint);
  font-size: 8px;
}

.ai-advice {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 15px 0 13px;
}

.advice-item {
  display: flex;
  gap: 9px;
  align-items: flex-start;
}

.advice-bullet {
  width: 5px;
  height: 5px;
  margin-top: 6px;
  flex: none;
  background: var(--forest-3);
  border-radius: 50%;
}

.advice-item p {
  color: var(--ink-soft);
  font-size: 10.5px;
  line-height: 1.6;
}

.advice-item p strong {
  color: var(--ink);
  font-weight: 700;
}

.ai-foot {
  padding-top: 10px;
  color: var(--faint);
  font-size: 8px;
  border-top: 1px solid var(--line);
}

.checkin-peek {
  padding: 18px;
}

.checkin-peek-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.checkin-peek-head .eyebrow {
  margin-bottom: 4px;
}

.checkin-peek h3 {
  font-size: 14px;
  letter-spacing: -0.2px;
}

.checkin-seal {
  display: grid;
  width: 31px;
  height: 31px;
  color: var(--faint);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 50%;
  place-items: center;
}

.checkin-seal .icon {
  width: 13px;
  height: 13px;
}

.checkin-seal.done {
  color: var(--forest);
  background: var(--lime);
  border-color: var(--lime);
}

.mini-week {
  display: flex;
  justify-content: space-between;
  gap: 5px;
  margin: 15px 0 14px;
}

.week-day {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.week-day span {
  color: var(--faint);
  font-size: 7.5px;
}

.week-day i {
  display: block;
  width: 100%;
  max-width: 22px;
  height: 6px;
  background: var(--line);
  border-radius: 5px;
}

.week-day.done i {
  background: var(--forest-3);
}

.week-day.today i {
  background: var(--lime);
  box-shadow: 0 0 0 3px rgba(217, 242, 143, 0.22);
}

.week-day.miss i {
  background: rgba(184, 89, 74, 0.18);
}

.week-day small {
  font-size: 7.5px;
  color: var(--faint);
}

/* =========================================================
   Page heads / task view
   ========================================================= */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 17px 4px 27px;
}

.page-head h1 {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 620;
  line-height: 1.12;
  letter-spacing: -1.5px;
}

.page-head p {
  max-width: 580px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.quick-templates {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}

.quick-label {
  margin-right: 5px;
  color: var(--faint);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.template-chip {
  height: 30px;
  padding: 0 11px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 550;
  background: rgba(255, 253, 248, 0.75);
  border: 1px solid var(--line);
  border-radius: 20px;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.template-chip:hover {
  background: var(--surface);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.task-panel {
  padding: 21px;
}

.task-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 16px;
}

.segmented {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: var(--surface-2);
  border-radius: 11px;
}

.segmented button {
  height: 30px;
  padding: 0 12px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  background: transparent;
  border: 0;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

.segmented button.active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 3px 8px rgba(24, 55, 46, 0.07);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 190px;
  height: 35px;
  padding: 0 11px;
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: 10px;
}

.search-box:focus-within {
  background: var(--surface);
  border-color: var(--line-strong);
}

.search-box .icon {
  width: 13px;
  height: 13px;
  color: var(--faint);
}

.search-box input {
  width: 100%;
  min-width: 0;
  padding: 0;
  font-size: 10.5px;
  background: transparent;
  border: 0;
  outline: 0;
}

.search-box input::placeholder {
  color: var(--faint);
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.task-row {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 61px;
  padding: 10px 11px;
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: 13px;
  transition: background 0.2s, border-color 0.2s;
}

.task-row:hover {
  background: #faf6ee;
  border-color: var(--line);
}

.task-row.is-done {
  opacity: 0.65;
}

.task-check {
  display: grid;
  width: 25px;
  height: 25px;
  flex: none;
  color: var(--faint);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  place-items: center;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.task-check .icon {
  width: 12px;
  height: 12px;
}

.task-check:hover {
  border-color: var(--forest-3);
  color: var(--forest-3);
}

.task-row.is-done .task-check {
  color: var(--white);
  background: var(--forest-3);
  border-color: var(--forest-3);
}

.task-main {
  flex: 1;
  min-width: 0;
}

.task-title-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.task-title {
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-row.is-done .task-title {
  color: var(--muted);
  text-decoration: line-through;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  color: var(--faint);
  font-size: 8.5px;
}

.task-meta span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.task-meta .icon {
  width: 10px;
  height: 10px;
}

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

.priority-dot.must { background: var(--coral); }
.priority-dot.high { background: #c89b45; }
.priority-dot.normal { background: var(--faint); }

.task-actions {
  display: flex;
  gap: 2px;
  flex: none;
  opacity: 0;
  transition: opacity 0.2s;
}

.task-row:hover .task-actions {
  opacity: 1;
}

.task-action {
  display: grid;
  width: 28px;
  height: 28px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 8px;
  place-items: center;
}

.task-action:hover {
  color: var(--ink);
  background: var(--surface);
}

.task-action.danger:hover {
  color: var(--danger);
  background: rgba(184, 89, 74, 0.07);
}

.task-action .icon {
  width: 13px;
  height: 13px;
}

.empty-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 20px;
  text-align: center;
}

.empty-list .empty-orbit {
  width: 55px;
  height: 55px;
  margin-bottom: 15px;
  box-shadow: 0 0 0 9px rgba(217, 242, 143, 0.17);
}

.empty-list .empty-orbit .icon {
  width: 20px;
  height: 20px;
}

.empty-list h3 {
  font-size: 15px;
}

.empty-list p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10.5px;
}

.insights-mini {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  margin-top: 14px;
  padding: 22px 24px;
  background:
    radial-gradient(circle at 85% 50%, rgba(217, 242, 143, 0.08), transparent 14rem),
    var(--surface);
}

.insights-mini h3 {
  max-width: 620px;
  font-size: 15px;
  font-weight: 620;
  line-height: 1.5;
}

.insights-mini p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

/* =========================================================
   Check-in view
   ========================================================= */
.streak-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.35fr 0.8fr;
  gap: 30px;
  overflow: hidden;
  padding: 33px 37px;
  color: var(--surface);
  background:
    radial-gradient(circle at 85% 20%, rgba(217, 242, 143, 0.16), transparent 19rem),
    linear-gradient(130deg, #183c32, #122e27);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 52px rgba(22, 52, 43, 0.15);
}

.streak-hero-main {
  position: relative;
  z-index: 1;
}

.streak-big {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 5px 0 8px;
}

.streak-big span {
  font-size: clamp(60px, 8vw, 94px);
  font-weight: 580;
  line-height: 0.95;
  letter-spacing: -5px;
  color: var(--lime);
}

.streak-big small {
  color: rgba(255, 255, 255, 0.5);
  font-size: 17px;
  font-weight: 500;
}

.streak-hero-main > p {
  max-width: 440px;
  color: rgba(255, 255, 255, 0.43);
  font-size: 11.5px;
  line-height: 1.6;
}

.week-dots.large {
  display: flex;
  gap: 9px;
  margin-top: 22px;
}

.week-dots.large .week-day {
  flex: none;
  width: 43px;
  gap: 6px;
}

.week-dots.large .week-day span {
  color: rgba(255, 255, 255, 0.35);
  font-size: 8.5px;
}

.week-dots.large .week-day i {
  width: 100%;
  max-width: none;
  height: 7px;
  background: rgba(255, 255, 255, 0.09);
}

.week-dots.large .week-day.done i {
  background: var(--lime);
}

.week-dots.large .week-day.today i {
  background: rgba(217, 242, 143, 0.48);
  box-shadow: 0 0 0 3px rgba(217, 242, 143, 0.12);
}

.week-dots.large .week-day.miss i {
  background: rgba(255, 255, 255, 0.08);
}

.week-dots.large .week-day small {
  color: rgba(255, 255, 255, 0.23);
  font-size: 7.5px;
}

.streak-hero-side {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 11px;
  padding-left: 28px;
  border-left: 1px solid rgba(255, 255, 255, 0.09);
}

.streak-best {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}

.streak-best span {
  color: rgba(255, 255, 255, 0.4);
  font-size: 10px;
}

.streak-best strong {
  color: rgba(255, 255, 255, 0.85);
  font-size: 18px;
  font-weight: 600;
}

.next-badge {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 8px;
  padding: 11px 12px;
  color: rgba(217, 242, 143, 0.8);
  font-size: 9.5px;
  line-height: 1.45;
  background: rgba(217, 242, 143, 0.07);
  border: 1px solid rgba(217, 242, 143, 0.12);
  border-radius: 11px;
}

.next-badge .icon {
  width: 17px;
  height: 17px;
  flex: none;
}

.streak-grain {
  position: absolute;
  inset: 0;
  opacity: 0.6;
  background-image: radial-gradient(rgba(255, 255, 255, 0.1) 0.6px, transparent 0.8px);
  background-size: 17px 17px;
  mask-image: linear-gradient(120deg, transparent, #000);
  pointer-events: none;
}

.checkin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr);
  gap: 14px;
  margin-top: 14px;
}

.reflection-panel,
.heatmap-panel {
  padding: 24px;
}

.saved-label {
  color: var(--forest-3);
  font-size: 9.5px;
  font-weight: 650;
}

.reflection-field {
  position: relative;
  margin-top: 19px;
}

.reflection-field > label,
.range-head label {
  display: block;
  margin-bottom: 9px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 650;
}

.mood-scale {
  display: flex;
  gap: 6px;
}

.mood-scale button {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 9px 5px 8px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 550;
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: 11px;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}

.mood-scale button span {
  display: grid;
  width: 24px;
  height: 24px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  background: var(--surface);
  border-radius: 50%;
  place-items: center;
}

.mood-scale button:hover {
  transform: translateY(-2px);
  border-color: var(--line);
}

.mood-scale button.selected {
  color: var(--forest);
  background: var(--mint);
  border-color: rgba(44, 107, 84, 0.2);
}

.mood-scale button.selected span {
  color: var(--forest);
  background: var(--lime);
}

.range-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.range-head label {
  margin-bottom: 0;
}

.range-head output {
  color: var(--forest-3);
  font-size: 10px;
  font-weight: 700;
}

.range {
  width: 100%;
  height: 4px;
  margin: 15px 0 8px;
  cursor: pointer;
  accent-color: var(--forest-3);
}

.range-labels {
  display: flex;
  justify-content: space-between;
  color: var(--faint);
  font-size: 8px;
}

.reflection-field textarea {
  width: 100%;
  min-height: 96px;
  padding: 12px 13px;
  resize: vertical;
  font-size: 11.5px;
  line-height: 1.6;
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: 12px;
  outline: 0;
  transition: background 0.2s, border-color 0.2s;
}

.reflection-field textarea:focus {
  background: var(--surface);
  border-color: var(--line-strong);
}

.reflection-field textarea::placeholder {
  color: var(--faint);
}

.char-count {
  position: absolute;
  right: 10px;
  bottom: 8px;
  color: var(--faint);
  font-size: 8px;
  pointer-events: none;
}

.reflection-panel .btn.full {
  margin-top: 19px;
}

.heatmap-wrap {
  overflow-x: auto;
  padding: 4px 0 8px;
}

.heatmap {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(7, 13px);
  gap: 4px;
  width: max-content;
  min-width: 100%;
}

.heat-cell {
  width: 13px;
  height: 13px;
  background: #ede9e0;
  border-radius: 3px;
  transition: transform 0.15s;
}

.heat-cell:hover {
  transform: scale(1.35);
}

.heat-cell.level-1 { background: #d7e8cf; }
.heat-cell.level-2 { background: #a9cdb2; }
.heat-cell.level-3 { background: #629b79; }
.heat-cell.level-4 { background: #2c6b54; }
.heat-cell.is-today {
  box-shadow: 0 0 0 2px var(--lime);
}

.heatmap-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin: 2px 0 17px;
  color: var(--faint);
  font-size: 8px;
}

.heatmap-legend i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.heatmap-legend .level-0 { background: #ede9e0; }
.heatmap-legend .level-1 { background: #d7e8cf; }
.heatmap-legend .level-2 { background: #a9cdb2; }
.heatmap-legend .level-3 { background: #629b79; }
.heatmap-legend .level-4 { background: #2c6b54; }

.heatmap-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.heatmap-stats > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.heatmap-stats strong {
  font-size: 18px;
  font-weight: 620;
  letter-spacing: -0.5px;
}

.heatmap-stats span {
  color: var(--faint);
  font-size: 8px;
}

.history-panel {
  margin-top: 14px;
  padding: 24px;
}

.checkin-history {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.history-item {
  padding: 13px 14px;
  background: var(--surface-2);
  border-radius: 12px;
}

.history-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.history-item strong {
  font-size: 11px;
  font-weight: 650;
}

.history-item small {
  color: var(--faint);
  font-size: 8px;
}

.history-item p {
  margin-top: 7px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.history-empty {
  grid-column: 1 / -1;
  padding: 25px;
  color: var(--faint);
  font-size: 10.5px;
  text-align: center;
  background: var(--surface-2);
  border-radius: 12px;
}

/* =========================================================
   Insights
   ========================================================= */
.weekly-review {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  overflow: hidden;
  padding: 30px 34px;
  color: var(--surface);
  background:
    radial-gradient(circle at 80% 0%, rgba(230, 188, 160, 0.14), transparent 17rem),
    linear-gradient(130deg, #24493e, #142f28);
  border-radius: var(--radius-xl);
  box-shadow: 0 22px 48px rgba(22, 52, 43, 0.14);
}

.weekly-review-copy {
  position: relative;
  z-index: 1;
  max-width: 680px;
}

.weekly-review-copy h2 {
  font-size: clamp(21px, 2.4vw, 30px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.8px;
}

.weekly-review-copy p {
  max-width: 620px;
  margin-top: 9px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 11.5px;
  line-height: 1.65;
}

.weekly-score {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex: none;
  min-width: 125px;
  padding-left: 26px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.weekly-score span {
  color: rgba(255, 255, 255, 0.4);
  font-size: 9px;
}

.weekly-score strong {
  margin: 2px 0;
  color: var(--lime);
  font-size: 44px;
  font-weight: 570;
  line-height: 1.1;
  letter-spacing: -2px;
}

.weekly-score small {
  color: rgba(255, 255, 255, 0.35);
  font-size: 8.5px;
}

.weekly-review-glow {
  position: absolute;
  top: -100px;
  right: 16%;
  width: 250px;
  height: 250px;
  border: 1px solid rgba(217, 242, 143, 0.08);
  border-radius: 50%;
  box-shadow: 0 0 0 45px rgba(217, 242, 143, 0.025), 0 0 0 90px rgba(217, 242, 143, 0.014);
}

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

.chart-panel,
.category-panel,
.achievement-panel {
  padding: 24px;
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  height: 178px;
  margin-top: 22px;
  padding-top: 12px;
  border-bottom: 1px solid var(--line);
}

.bar-col {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  height: 100%;
  min-width: 0;
}

.bar-wrap {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  max-width: 42px;
  flex: 1;
}

.bar {
  position: relative;
  display: block;
  width: 100%;
  min-height: 3px;
  background: var(--mint);
  border-radius: 7px 7px 3px 3px;
  transition: height 0.7s var(--ease), background 0.2s;
}

.bar-col:hover .bar {
  background: var(--lime-deep);
}

.bar.today {
  background: var(--forest-3);
}

.bar.today:hover {
  background: var(--forest);
}

.bar-value {
  position: absolute;
  bottom: calc(100% + 5px);
  left: 50%;
  color: var(--muted);
  font-size: 8px;
  font-weight: 650;
  white-space: nowrap;
  transform: translateX(-50%);
}

.bar-col > small {
  color: var(--faint);
  font-size: 8px;
  white-space: nowrap;
}

.bar-col > small.today {
  color: var(--ink);
  font-weight: 700;
}

.focus-chart .bar {
  background: var(--sky);
}

.focus-chart .bar-col:hover .bar {
  background: #b9d9e6;
}

.focus-chart .bar.today {
  background: #5f8fa4;
}

.category-body {
  display: flex;
  align-items: center;
  gap: 27px;
  min-height: 178px;
  margin-top: 20px;
}

.donut {
  position: relative;
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 122px;
  height: 122px;
  background: conic-gradient(var(--forest-3) 0 25%, var(--sky) 25% 50%, var(--sand) 50% 75%, var(--peach) 75% 100%);
  border-radius: 50%;
}

.donut::after {
  content: "";
  position: absolute;
  inset: 15px;
  background: var(--surface);
  border-radius: 50%;
}

.donut span,
.donut small {
  position: relative;
  z-index: 1;
}

.donut span {
  font-size: 25px;
  font-weight: 620;
  line-height: 1;
  letter-spacing: -1px;
}

.donut small {
  margin-top: 3px;
  color: var(--faint);
  font-size: 8px;
}

.category-legend {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 9px;
}

.category-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 9.5px;
}

.category-item i {
  width: 7px;
  height: 7px;
  flex: none;
  background: var(--forest-3);
  border-radius: 50%;
}

.category-item i.study { background: var(--sky); }
.category-item i.health { background: var(--sand); }
.category-item i.life { background: var(--peach); }
.category-item span {
  color: var(--ink-soft);
  font-weight: 550;
}
.category-item small {
  margin-left: auto;
  color: var(--faint);
  font-size: 8px;
}

.achievement-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 19px;
}

.achievement {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: var(--surface-2);
  border-radius: 11px;
}

.achievement-icon {
  display: grid;
  width: 30px;
  height: 30px;
  flex: none;
  color: var(--faint);
  background: var(--surface-3);
  border-radius: 9px;
  place-items: center;
}

.achievement-icon .icon {
  width: 14px;
  height: 14px;
}

.achievement.unlocked .achievement-icon {
  color: var(--forest);
  background: var(--lime);
}

.achievement strong {
  display: block;
  font-size: 9.5px;
  line-height: 1.3;
}

.achievement small {
  display: block;
  margin-top: 2px;
  color: var(--faint);
  font-size: 7.5px;
}

.achievement.unlocked small {
  color: var(--forest-3);
}

/* =========================================================
   Settings
   ========================================================= */
.settings-panel {
  padding: 24px;
  margin-bottom: 13px;
}

.settings-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.settings-icon {
  display: grid;
  width: 37px;
  height: 37px;
  flex: none;
  border-radius: 11px;
  place-items: center;
}

.settings-icon .icon {
  width: 17px;
  height: 17px;
}

.settings-icon.mint { color: var(--forest-3); background: var(--mint); }
.settings-icon.sand { color: #8d682d; background: var(--sand); }
.settings-icon.sky { color: #376b7e; background: var(--sky); }
.settings-icon.peach { color: #a65d49; background: var(--peach); }

.settings-head h2 {
  font-size: 15px;
  letter-spacing: -0.2px;
}

.settings-head p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9.5px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.settings-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.settings-grid.two {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.mobile-hint {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.mobile-hint p {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.mobile-hint p strong {
  color: var(--forest-3);
}

.mobile-hint code {
  padding: 1px 6px;
  color: var(--forest-2);
  font-size: 10px;
  background: var(--mint);
  border-radius: 5px;
}

.mobile-hint .btn {
  align-self: flex-start;
  margin-top: 3px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field > span,
.field label {
  color: var(--ink-soft);
  font-size: 9.5px;
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  color: var(--ink);
  font-size: 11px;
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: 10px;
  outline: 0;
  transition: background 0.2s, border-color 0.2s;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  background: var(--surface);
  border-color: var(--line-strong);
}

.field select {
  cursor: pointer;
}

.switch-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 58px;
  padding: 9px 13px;
  background: var(--surface-2);
  border-radius: 11px;
}

.switch-field > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.switch-field strong {
  font-size: 10.5px;
  font-weight: 650;
}

.switch-field small {
  color: var(--faint);
  font-size: 8.5px;
}

.switch-field input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-ui {
  position: relative;
  width: 38px;
  height: 22px;
  flex: none;
  background: #ddd7cb;
  border-radius: 20px;
  transition: background 0.25s;
}

.switch-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: var(--white);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(24, 55, 46, 0.14);
  transition: transform 0.25s var(--ease);
}

.switch-field input:checked + .switch-ui {
  background: var(--forest-3);
}

.switch-field input:checked + .switch-ui::after {
  transform: translateX(16px);
}

.settings-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.settings-action-row.wrap {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  height: 27px;
  padding: 0 9px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  background: var(--surface-2);
  border-radius: 20px;
}

.status-chip.granted {
  color: var(--forest-3);
  background: var(--mint);
}

.settings-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 15px 17px;
  color: var(--muted);
  background: rgba(255, 253, 248, 0.55);
  border: 1px dashed var(--line-strong);
  border-radius: 13px;
}

.settings-note .icon {
  width: 14px;
  height: 14px;
  margin-top: 1px;
  flex: none;
}

.settings-note p {
  font-size: 9.5px;
  line-height: 1.6;
}

/* =========================================================
   Modals & forms
   ========================================================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(11, 27, 23, 0.55);
  backdrop-filter: blur(10px);
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  width: min(560px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 26px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 25px;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.35s var(--ease);
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 21px;
}

.modal-head h2 {
  font-size: 22px;
  font-weight: 620;
  letter-spacing: -0.7px;
}

.modal-head .eyebrow {
  margin-bottom: 5px;
}

.modal-card .field {
  margin-bottom: 14px;
}

.field > input,
.field > select {
  font-size: 11.5px;
}

.chip-field {
  margin: 0 0 15px;
  padding: 0;
  border: 0;
}

.chip-field legend {
  margin-bottom: 8px;
  color: var(--ink-soft);
  font-size: 9.5px;
  font-weight: 600;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip-group label {
  cursor: pointer;
}

.chip-group input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chip-group label > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 11px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: 9px;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.chip-group label > span .icon {
  width: 13px;
  height: 13px;
}

.chip-group input:checked + span {
  color: var(--forest);
  background: var(--mint);
  border-color: rgba(44, 107, 84, 0.2);
}

.priority-group input[value="must"]:checked + span {
  color: #8e493b;
  background: var(--peach);
  border-color: rgba(166, 93, 73, 0.15);
}

.priority-group input[value="high"]:checked + span {
  color: #7b5d25;
  background: var(--sand);
  border-color: rgba(141, 104, 45, 0.16);
}

.modal-switches {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 13px 14px;
  background: var(--surface-2);
  border-radius: 11px;
}

.check-row {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 550;
  cursor: pointer;
}

.check-row input {
  width: 15px;
  height: 15px;
  accent-color: var(--forest-3);
}

.field.inline-time {
  flex-direction: row;
  align-items: center;
  gap: 9px;
  margin: 0;
}

.field.inline-time span {
  margin: 0;
}

.field.inline-time input {
  width: 105px;
  height: 31px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 23px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

/* Onboarding */
.onboarding-card {
  position: relative;
  display: grid;
  grid-template-columns: 0.87fr 1.13fr;
  width: min(980px, 100%);
  max-height: calc(100vh - 44px);
  overflow-y: auto;
  background: var(--surface);
  border-radius: 30px;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.45s var(--ease);
}

.onboarding-close {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 5;
  color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.06);
}

.onboarding-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  min-height: 610px;
  padding: 35px;
  color: var(--surface);
  background:
    radial-gradient(circle at 30% 22%, rgba(217, 242, 143, 0.16), transparent 15rem),
    linear-gradient(150deg, #1d4439, #112b24);
}

.onboarding-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.55;
  background-image: radial-gradient(rgba(255, 255, 255, 0.12) 0.6px, transparent 0.8px);
  background-size: 17px 17px;
  mask-image: linear-gradient(to bottom, #000, transparent 70%);
  pointer-events: none;
}

.onboarding-brand {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 11px;
}

.onboarding-brand strong {
  font-size: 22px;
  letter-spacing: 3px;
}

.orbit {
  position: relative;
  z-index: 2;
  display: grid;
  width: 230px;
  height: 230px;
  margin: auto;
  place-items: center;
}

.orbit-ring {
  position: absolute;
  border: 1px solid rgba(217, 242, 143, 0.16);
  border-radius: 50%;
}

.ring-one {
  inset: 15px;
}

.ring-two {
  inset: 48px;
  border-style: dashed;
}

.orbit-dot {
  position: absolute;
  width: 9px;
  height: 9px;
  background: var(--lime);
  border-radius: 50%;
  box-shadow: 0 0 16px rgba(217, 242, 143, 0.6);
}

.dot-one {
  top: 36px;
  right: 56px;
}

.dot-two {
  bottom: 59px;
  left: 30px;
  width: 5px;
  height: 5px;
  opacity: 0.55;
}

.orbit-core {
  display: grid;
  width: 83px;
  height: 83px;
  color: var(--forest);
  background: var(--lime);
  border-radius: 50%;
  box-shadow: 0 0 0 15px rgba(217, 242, 143, 0.06), 0 0 50px rgba(217, 242, 143, 0.2);
  place-items: center;
}

.orbit-core .icon {
  width: 34px;
  height: 34px;
}

.onboarding-visual blockquote {
  position: relative;
  z-index: 2;
  max-width: 300px;
  margin: 0;
  color: rgba(255, 255, 255, 0.64);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: -0.2px;
}

.onboarding-features {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  margin-top: 25px;
  color: rgba(217, 242, 143, 0.57);
  font-size: 9px;
}

.onboarding-features span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.onboarding-features .icon {
  width: 12px;
  height: 12px;
}

.onboarding-content {
  padding: 54px 45px 38px;
}

.onboarding-content h2 {
  font-size: 30px;
  font-weight: 620;
  line-height: 1.2;
  letter-spacing: -1.2px;
}

.onboarding-content > p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 11.5px;
}

.onboarding-content form {
  margin-top: 24px;
}

.onboarding-content .settings-grid {
  margin-bottom: 13px;
}

.energy-field {
  margin: 2px 0 21px;
  padding: 0;
  border: 0;
}

.energy-field legend {
  margin-bottom: 9px;
  color: var(--ink-soft);
  font-size: 9.5px;
  font-weight: 600;
}

.energy-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.energy-options label {
  cursor: pointer;
}

.energy-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.energy-options label > span {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 11px 10px;
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: 10px;
  transition: background 0.2s, border-color 0.2s;
}

.energy-options strong {
  font-size: 10.5px;
  font-weight: 650;
}

.energy-options small {
  color: var(--faint);
  font-size: 8px;
}

.energy-options input:checked + span {
  background: var(--mint);
  border-color: rgba(44, 107, 84, 0.24);
}

.energy-options input:checked + span strong {
  color: var(--forest);
}

.fineprint {
  margin-top: 11px;
  color: var(--faint);
  font-size: 8px;
  text-align: center;
}

.fineprint.centered {
  text-align: center;
}

/* Focus modal */
.focus-modal-card {
  width: min(480px, 100%);
}

.focus-dial {
  position: relative;
  width: 230px;
  height: 230px;
  margin: 2px auto 20px;
}

.focus-dial svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.focus-track {
  fill: none;
  stroke: var(--surface-3);
  stroke-width: 10;
}

.focus-progress {
  fill: none;
  stroke: var(--forest-3);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 590.62;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.4s linear;
}

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

.focus-time-wrap strong {
  font-size: 48px;
  font-weight: 570;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -2px;
}

.focus-time-wrap span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 1px;
}

.focus-duration {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-bottom: 19px;
}

.focus-duration button {
  height: 32px;
  padding: 0 11px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 600;
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: 8px;
}

.focus-duration button.active {
  color: var(--forest);
  background: var(--mint);
  border-color: rgba(44, 107, 84, 0.15);
}

.focus-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.focus-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 21px;
  padding-top: 16px;
  color: var(--faint);
  font-size: 9px;
  border-top: 1px solid var(--line);
}

.focus-meta .text-btn {
  font-size: 9.5px;
}

/* =========================================================
   Toast
   ========================================================= */
.toast-wrap {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: 360px;
  padding: 12px 15px;
  color: var(--surface);
  font-size: 11px;
  line-height: 1.45;
  background: var(--forest);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 13px 33px rgba(12, 32, 26, 0.2);
  animation: toastIn 0.35s var(--ease);
}

.toast .icon {
  width: 15px;
  height: 15px;
  color: var(--lime);
}

.toast.success {
  background: var(--forest-2);
}

.toast.error {
  background: #7d4036;
}

.toast.removing {
  animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateY(8px) scale(0.97); }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1240px) {
  .app-shell {
    grid-template-columns: 236px minmax(0, 1fr);
  }

  .content-shell {
    padding-left: 22px;
  }

  .hero-grid {
    gap: 25px;
    padding: 32px 35px 30px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero-side {
    gap: 16px;
  }

  .hero-ring-wrap {
    width: 108px;
    height: 108px;
  }

  .stat-card {
    padding: 14px 12px 12px;
  }

  .settings-grid.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1060px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(255px, 0.7fr);
  }

  .hero-side {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .hero-ring-wrap {
    width: 92px;
    height: 92px;
  }

  .hero-ring-label strong {
    font-size: 20px;
  }

  .energy-chart {
    width: 100%;
  }

  .energy-bars {
    height: 48px;
  }

  .dashboard-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.8fr);
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .checkin-history {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 940px) {
  .app-shell {
    display: block;
    padding: 10px;
  }

  .sidebar {
    position: fixed;
    top: 10px;
    bottom: 10px;
    left: 10px;
    z-index: 90;
    width: 258px;
    height: auto;
    transform: translateX(calc(-100% - 24px));
    transition: transform 0.35s var(--ease);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-close {
    display: grid;
  }

  .sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: block;
    background: rgba(11, 27, 23, 0.4);
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(3px);
    transition: opacity 0.3s;
  }

  .sidebar-scrim.show {
    opacity: 1;
    pointer-events: auto;
  }

  .content-shell {
    padding: 0;
  }

  .mobile-menu {
    display: grid;
  }

  .topbar {
    height: 62px;
    padding: 0 2px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(230px, 0.6fr);
  }

  .onboarding-card {
    grid-template-columns: 0.75fr 1.25fr;
  }

  .onboarding-content {
    padding: 50px 32px 35px;
  }

  .onboarding-visual {
    padding: 28px;
  }

  .orbit {
    width: 190px;
    height: 190px;
  }

  .onboarding-visual blockquote {
    font-size: 14px;
  }

  .onboarding-features {
    gap: 8px;
  }
}

@media (max-width: 780px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 25px;
    padding: 30px;
  }

  .hero-side {
    flex-direction: row;
    align-items: center;
  }

  .hero-ring-wrap {
    width: 96px;
    height: 96px;
  }

  .hero h1 {
    font-size: 39px;
  }

  .hero-side .energy-chart {
    min-width: 0;
  }

  .stat-grid {
    gap: 8px;
  }

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

  .rail {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .now-card {
    grid-column: 1 / -1;
  }

  .page-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
    padding-bottom: 21px;
  }

  .page-head h1 {
    font-size: 32px;
  }

  .streak-hero {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 28px;
  }

  .streak-hero-side {
    padding-top: 19px;
    padding-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    border-left: 0;
  }

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

  .weekly-review {
    flex-direction: column;
    align-items: flex-start;
    padding: 27px;
  }

  .weekly-score {
    align-items: flex-start;
    width: 100%;
    padding-top: 17px;
    padding-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 0;
  }

  .insights-mini {
    align-items: flex-start;
    flex-direction: column;
  }

  .checkin-history {
    grid-template-columns: 1fr;
  }

  .onboarding-card {
    grid-template-columns: 1fr;
    max-width: 600px;
  }

  .onboarding-visual {
    display: none;
  }

  .onboarding-content {
    padding: 36px 30px 30px;
  }

  .onboarding-close {
    color: var(--muted);
    background: var(--surface-2);
  }

  .settings-grid,
  .settings-grid.four,
  .settings-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-body {
    gap: 20px;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 14px;
  }

  .app-shell {
    padding: 7px;
  }

  .topbar {
    height: 56px;
    padding: 0 1px;
  }

  .live-clock {
    margin-right: 0;
    font-size: 12px;
  }

  .topbar-context {
    font-size: 10.5px;
  }

  .avatar {
    width: 34px;
    height: 34px;
    font-size: 11px;
  }

  .icon-btn {
    width: 36px;
    height: 36px;
  }

  .hero {
    min-height: 0;
    border-radius: 25px;
  }

  .hero-grid {
    padding: 25px 22px 23px;
  }

  .hero h1 {
    font-size: 33px;
    letter-spacing: -1.5px;
  }

  .hero-copy > p {
    font-size: 11.5px;
  }

  .hero-actions {
    margin-top: 19px;
  }

  .hero-actions .btn {
    flex: 1;
    min-width: 0;
    padding: 0 12px;
    font-size: 11.5px;
  }

  .hero-actions .btn-ghost-light {
    flex: 0 0 auto;
  }

  .hero-assumptions {
    gap: 5px 12px;
    margin-top: 16px;
    font-size: 8.5px;
  }

  .hero-side {
    gap: 15px;
  }

  .hero-ring-wrap {
    width: 83px;
    height: 83px;
  }

  .hero-ring-label strong {
    font-size: 18px;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-card {
    min-height: 79px;
    padding: 12px 11px 10px;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 8px;
    border-radius: 15px;
  }

  .stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }

  .stat-icon .icon {
    width: 14px;
    height: 14px;
  }

  .stat-body strong {
    font-size: 19px;
  }

  .stat-card > small {
    display: none;
  }

  .timeline-panel {
    min-height: 0;
    padding: 19px 13px 14px;
    border-radius: 19px;
  }

  .timeline-panel .panel-head {
    gap: 10px;
    margin-bottom: 13px;
  }

  .timeline-panel .panel-head h2 {
    font-size: 15px;
  }

  .timeline-panel .panel-head p {
    font-size: 10px;
  }

  .timeline-block {
    grid-template-columns: 42px 18px minmax(0, 1fr);
    gap: 5px;
  }

  .timeline-time {
    padding-top: 15px;
  }

  .timeline-time strong {
    font-size: 9.5px;
  }

  .timeline-time small {
    font-size: 7px;
  }

  .timeline-dot {
    width: 17px;
    height: 17px;
    margin-top: 16px;
  }

  .timeline-card {
    margin: 7px 0;
    padding: 10px 10px;
    border-radius: 12px;
  }

  .block-icon {
    width: 27px;
    height: 27px;
    border-radius: 8px;
  }

  .block-title {
    font-size: 11.5px;
  }

  .block-note {
    font-size: 8.5px;
  }

  .block-actions {
    gap: 2px;
  }

  .block-check,
  .block-focus {
    width: 24px;
    height: 24px;
  }

  .block-focus {
    display: none;
  }

  .timeline-block.is-break {
    min-height: 45px;
  }

  .timeline-block.is-break .timeline-card {
    padding: 6px 8px;
  }

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

  .now-card,
  .ai-card,
  .checkin-peek {
    grid-column: auto;
  }

  .panel {
    border-radius: 19px;
  }

  .page-head {
    padding-top: 14px;
  }

  .page-head h1 {
    font-size: 28px;
  }

  .page-head p {
    font-size: 11px;
  }

  .page-head .btn {
    width: 100%;
  }

  .quick-templates {
    gap: 5px;
  }

  .template-chip {
    height: 28px;
    padding: 0 9px;
    font-size: 9px;
  }

  .task-panel {
    padding: 15px 12px;
  }

  .task-toolbar {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 8px;
  }

  .search-box {
    width: 100%;
  }

  .segmented button {
    flex: 1;
  }

  .task-actions {
    opacity: 1;
  }

  .task-row {
    padding: 9px;
  }

  .insights-mini {
    padding: 19px;
  }

  .streak-hero {
    padding: 24px 21px;
    border-radius: 24px;
  }

  .streak-big span {
    font-size: 68px;
  }

  .week-dots.large {
    gap: 5px;
  }

  .week-dots.large .week-day {
    width: 36px;
  }

  .reflection-panel,
  .heatmap-panel,
  .history-panel,
  .chart-panel,
  .category-panel,
  .achievement-panel,
  .settings-panel {
    padding: 18px;
  }

  .mood-scale {
    gap: 4px;
  }

  .mood-scale button {
    padding: 8px 3px;
    font-size: 7px;
  }

  .heatmap {
    grid-template-rows: repeat(7, 11px);
    gap: 3px;
  }

  .heat-cell {
    width: 11px;
    height: 11px;
  }

  .donut {
    width: 105px;
    height: 105px;
  }

  .donut span {
    font-size: 22px;
  }

  .category-body {
    flex-direction: column;
    align-items: flex-start;
  }

  .category-legend {
    width: 100%;
  }

  .achievement-list {
    grid-template-columns: 1fr;
  }

  .weekly-review {
    padding: 23px 21px;
    border-radius: 24px;
  }

  .weekly-review-copy h2 {
    font-size: 23px;
  }

  .settings-grid,
  .settings-grid.four,
  .settings-grid.two {
    grid-template-columns: 1fr;
  }

  .settings-action-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .settings-action-row.wrap {
    flex-direction: row;
  }

  .modal-backdrop {
    padding: 9px;
    align-items: flex-end;
  }

  .modal-card {
    max-height: calc(100vh - 18px);
    padding: 21px 18px;
    border-radius: 22px;
  }

  .onboarding-backdrop {
    align-items: center;
  }

  .onboarding-content {
    padding: 30px 21px 25px;
  }

  .onboarding-content h2 {
    font-size: 26px;
  }

  .energy-options {
    grid-template-columns: 1fr;
  }

  .energy-options label > span {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .focus-dial {
    width: 200px;
    height: 200px;
  }

  .focus-time-wrap strong {
    font-size: 42px;
  }

  .toast-wrap {
    right: 12px;
    bottom: 12px;
    left: 12px;
  }

  .toast {
    max-width: none;
  }

  .app-footer {
    flex-direction: column;
    gap: 2px;
    padding-bottom: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
