:root {
  --bg: #efede3;
  --paper: #fbfaf5;
  --paper-soft: #f5f3ea;
  --sidebar: #e8ebe1;
  --ink: #253028;
  --ink-soft: #4c574d;
  --muted: #7d857a;
  --line: rgba(37, 48, 40, 0.11);
  --line-strong: rgba(37, 48, 40, 0.18);
  --forest: #2f4638;
  --forest-deep: #23362b;
  --sage: #dbe2d4;
  --sage-deep: #c7d1bf;
  --cream: #f3eddf;
  --cream-soft: #faf6ec;
  --peach: #d7a17b;
  --sans: "Inter", "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", "Songti SC", "STSong", "Noto Serif SC", "SimSun", serif;
  --shadow: 0 34px 90px rgba(47, 58, 46, 0.13), 0 2px 8px rgba(47, 58, 46, 0.05);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  display: flow-root;
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(900px 620px at 4% -6%, rgba(255, 252, 241, 0.9), transparent 62%),
    radial-gradient(1000px 700px at 103% 104%, rgba(204, 215, 197, 0.65), transparent 58%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid rgba(47, 70, 56, 0.65);
  outline-offset: 3px;
}

button {
  cursor: pointer;
}

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

.ambient-glow--one {
  width: 420px;
  height: 420px;
  top: -180px;
  right: 14%;
  background: radial-gradient(circle, rgba(255, 248, 226, 0.7), transparent 68%);
}

.ambient-glow--two {
  width: 520px;
  height: 520px;
  left: -220px;
  bottom: -260px;
  background: radial-gradient(circle, rgba(188, 204, 179, 0.45), transparent 68%);
}

.app {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  width: min(1440px, calc(100vw - 40px));
  min-height: calc(100vh - 40px);
  margin: 20px auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 30px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.app::after {
  position: absolute;
  z-index: 20;
  inset: 0;
  border-radius: inherit;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  opacity: 0.026;
  content: "";
  pointer-events: none;
  mix-blend-mode: multiply;
}

/* Sidebar */
.sidebar {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  padding: 28px 20px 22px;
  border-right: 1px solid rgba(37, 48, 40, 0.07);
  background:
    radial-gradient(360px 300px at 20% 0%, rgba(255, 255, 248, 0.72), transparent 70%),
    linear-gradient(180deg, #e9ece2 0%, #e4e8dd 64%, #e6e9df 100%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  margin-left: 6px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 13px;
  background: var(--forest);
  box-shadow: 0 8px 18px rgba(47, 70, 56, 0.18);
  color: var(--cream);
}

.brand-mark svg {
  width: 27px;
  height: 27px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.brand-copy strong {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1;
}

.brand-copy small {
  color: var(--muted);
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
}

.nav {
  margin-top: 48px;
}

.nav-label {
  margin: 0 0 10px 14px;
  color: #929a8f;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.nav-label--spaced {
  margin-top: 28px;
}

.nav-item {
  position: relative;
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
  padding: 11px 13px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #687166;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}

.nav-item svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  opacity: 0.8;
}

.nav-item:hover {
  background: rgba(251, 250, 245, 0.56);
  color: var(--ink);
}

.nav-item.is-active {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 5px 16px rgba(47, 58, 46, 0.07);
}

.nav-item.is-active svg {
  opacity: 1;
}

.nav-dot {
  width: 5px;
  height: 5px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--forest);
}

.nav-item.is-active .nav-dot {
  display: block;
}

.nav-item:not(.is-active) .nav-dot {
  display: none;
}

.sidebar-bottom {
  margin-top: auto;
  padding-top: 30px;
}

.week-card {
  position: relative;
  overflow: hidden;
  padding: 16px 16px 14px;
  border: 1px solid rgba(37, 48, 40, 0.08);
  border-radius: 18px;
  background: rgba(251, 250, 245, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.week-card::after {
  position: absolute;
  width: 92px;
  height: 92px;
  right: -43px;
  bottom: -52px;
  border: 1px solid rgba(47, 70, 56, 0.1);
  border-radius: 50%;
  content: "";
}

.week-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
}

.week-card-head svg {
  width: 18px;
  height: 18px;
  color: var(--forest);
  opacity: 0.65;
}

.week-card-total {
  margin-top: 11px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 29px;
  letter-spacing: -0.02em;
  line-height: 1;
}

.week-card-total span {
  margin: 0 1px 0 2px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
}

.week-card-bars {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 31px;
  margin-top: 14px;
}

.week-card-bars i {
  width: 100%;
  height: max(4px, var(--bar));
  border-radius: 3px 3px 2px 2px;
  background: var(--sage-deep);
}

.week-card-bars i.is-today {
  background: var(--forest);
}

.week-card p {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 9.5px;
}

.week-up {
  margin-right: 4px;
  color: #5e7d62;
  font-weight: 600;
}

.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding: 0 4px;
}

.avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 28%, #f2e7d5, transparent 55%),
    #c8b9a4;
  color: #4f4539;
  font-family: var(--serif);
  font-size: 14px;
}

.profile-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.profile-copy strong {
  font-size: 12px;
  font-weight: 600;
}

.profile-copy small {
  color: var(--muted);
  font-size: 9.5px;
}

.icon-btn {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.icon-btn:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.55);
  transform: translateY(-1px);
}

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

.icon-btn--small {
  width: 26px;
  height: 26px;
  border: 0;
}

.icon-btn--small svg {
  width: 16px;
  height: 16px;
}

/* Main */
.main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 54px 36px 20px;
}

.topbar {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 26px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #91998e;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  line-height: 1.2;
}

.eyebrow--small {
  margin-bottom: 7px;
  font-size: 8px;
  letter-spacing: 0.17em;
}

.greeting h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(28px, 2.8vw, 36px);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.18;
}

.greeting-sub {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 0.02em;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-top: 16px;
}

.date-chip,
.streak-chip {
  display: flex;
  height: 36px;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(251, 250, 245, 0.72);
  color: var(--ink-soft);
  font-size: 10.5px;
  white-space: nowrap;
}

.date-chip svg {
  width: 15px;
  height: 15px;
  opacity: 0.65;
}

.streak-chip {
  border-color: rgba(185, 132, 92, 0.18);
  background: rgba(247, 238, 225, 0.74);
  color: #886044;
}

.streak-chip svg {
  width: 16px;
  height: 16px;
  color: var(--peach);
}

.streak-chip strong {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 600;
}

/* Dashboard */
.dashboard {
  display: grid;
  flex: 1;
  grid-template-columns: minmax(0, 1.58fr) minmax(340px, 0.92fr);
  gap: 20px;
  min-height: 0;
}

/* Focus card */
.focus-card {
  position: relative;
  display: flex;
  min-height: 612px;
  flex-direction: column;
  overflow: hidden;
  padding: 26px 28px 20px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 26px;
  background:
    radial-gradient(110% 95% at 12% -4%, #48604f 0%, transparent 58%),
    radial-gradient(90% 80% at 102% 105%, #192b21 0%, transparent 60%),
    linear-gradient(145deg, #30493a 0%, #283d31 52%, #24382d 100%);
  box-shadow: 0 22px 44px rgba(37, 53, 43, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: var(--cream);
  isolation: isolate;
}

.focus-card::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: radial-gradient(circle at 50% 46%, rgba(255, 248, 220, 0.05), transparent 38%);
  content: "";
}

.focus-deco {
  position: absolute;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.contour-lines {
  position: absolute;
  width: 100%;
  height: 100%;
  top: -4%;
  right: -8%;
  opacity: 0.9;
}

.focus-orb {
  position: absolute;
  width: 330px;
  height: 330px;
  right: -120px;
  bottom: -180px;
  border: 1px solid rgba(243, 237, 223, 0.08);
  border-radius: 50%;
  box-shadow: 0 0 0 45px rgba(243, 237, 223, 0.025), 0 0 0 95px rgba(243, 237, 223, 0.018);
}

.focus-top {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.mode-switch {
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  background: rgba(15, 30, 22, 0.22);
  backdrop-filter: blur(8px);
}

.mode-btn {
  padding: 7px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(243, 237, 223, 0.58);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  transition: color 0.25s, background 0.25s, box-shadow 0.25s;
}

.mode-btn:hover {
  color: var(--cream);
}

.mode-btn.is-active {
  background: var(--cream);
  box-shadow: 0 3px 10px rgba(11, 25, 17, 0.16);
  color: #2b4334;
  font-weight: 600;
}

.rounds {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(243, 237, 223, 0.47);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.rounds strong {
  color: rgba(243, 237, 223, 0.82);
  font-family: var(--serif);
  font-size: 11px;
  font-weight: 500;
}

.round-dots {
  display: flex;
  gap: 5px;
}

.round-dots i {
  width: 5px;
  height: 5px;
  border: 1px solid rgba(243, 237, 223, 0.32);
  border-radius: 50%;
}

.round-dots i.is-done {
  border-color: var(--cream);
  background: var(--cream);
  box-shadow: 0 0 8px rgba(243, 237, 223, 0.15);
}

.timer-stage {
  position: relative;
  width: min(310px, 58%);
  aspect-ratio: 1;
  margin: 21px auto 10px;
  flex: 0 1 auto;
}

.timer-ring {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  transform: rotate(-90deg);
}

.ring-halo {
  fill: none;
  stroke: rgba(243, 237, 223, 0.11);
  stroke-dasharray: 1 9;
  stroke-linecap: round;
  stroke-width: 1;
}

.ring-track {
  fill: none;
  stroke: rgba(243, 237, 223, 0.1);
  stroke-width: 4;
}

.ring-progress {
  fill: none;
  stroke: var(--cream);
  stroke-linecap: round;
  stroke-width: 4;
  filter: drop-shadow(0 0 7px rgba(243, 237, 223, 0.16));
  transition: stroke-dashoffset 0.45s linear;
}

.timer-inner {
  position: absolute;
  display: flex;
  inset: 0;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  padding-top: 2px;
  text-align: center;
}

.timer-kicker {
  margin: 0 0 10px;
  color: rgba(243, 237, 223, 0.42);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  transition: opacity 0.3s;
}

.timer-time {
  color: var(--cream);
  font-family: var(--serif);
  font-size: clamp(54px, 5.3vw, 67px);
  font-variant-numeric: tabular-nums;
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1;
  text-shadow: 0 2px 20px rgba(10, 23, 15, 0.16);
}

.timer-time.is-paused {
  animation: breathe 3.4s ease-in-out infinite;
}

.timer-hint {
  margin: 12px 0 0;
  color: rgba(243, 237, 223, 0.43);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  transition: opacity 0.25s;
}

.focus-card.is-running .timer-hint {
  color: rgba(243, 237, 223, 0.62);
}

@keyframes breathe {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

.timer-controls {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 13px;
  margin-top: 2px;
}

.round-control {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border: 1px solid rgba(243, 237, 223, 0.13);
  border-radius: 50%;
  background: rgba(243, 237, 223, 0.035);
  color: rgba(243, 237, 223, 0.62);
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}

.round-control:hover {
  border-color: rgba(243, 237, 223, 0.24);
  background: rgba(243, 237, 223, 0.08);
  color: var(--cream);
  transform: translateY(-1px);
}

.round-control:active {
  transform: scale(0.96);
}

.round-control svg {
  width: 19px;
  height: 19px;
}

.start-btn {
  display: inline-flex;
  min-width: 148px;
  height: 47px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--cream);
  box-shadow: 0 7px 18px rgba(12, 27, 18, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  color: #2a4232;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.start-btn:hover {
  background: #faf5e9;
  box-shadow: 0 10px 24px rgba(12, 27, 18, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transform: translateY(-1px);
}

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

.start-btn-icon {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
}

.start-btn-icon svg {
  width: 17px;
  height: 17px;
}

.pause-icon {
  display: none;
}

.focus-card.is-running .play-icon {
  display: none;
}

.focus-card.is-running .pause-icon {
  display: block;
}

.intention-row {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 19px;
}

.intention-label {
  color: rgba(243, 237, 223, 0.32);
  font-size: 9px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.intention-pick {
  display: inline-flex;
  max-width: 68%;
  height: 30px;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid rgba(243, 237, 223, 0.1);
  border-radius: 999px;
  background: rgba(243, 237, 223, 0.035);
  color: rgba(243, 237, 223, 0.68);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.intention-pick:hover {
  border-color: rgba(243, 237, 223, 0.21);
  background: rgba(243, 237, 223, 0.08);
  color: var(--cream);
}

.intention-pick strong {
  overflow: hidden;
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.intention-pick > svg {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  opacity: 0.45;
}

.intention-pick.is-empty {
  color: rgba(243, 237, 223, 0.38);
}

.intention-pick.is-empty .intention-target {
  border-color: rgba(243, 237, 223, 0.3);
}

.intention-target {
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border: 1px solid rgba(243, 237, 223, 0.75);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(243, 237, 223, 0.05);
}

.ambient-bar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(243, 237, 223, 0.09);
}

.ambient-bar.is-flashing {
  animation: bar-flash 1.2s var(--ease);
}

@keyframes bar-flash {
  0%, 100% { background: transparent; }
  35% { background: rgba(243, 237, 223, 0.07); box-shadow: inset 0 0 0 1px rgba(243, 237, 223, 0.1); }
}

.ambient-label {
  display: flex;
  align-items: center;
  gap: 5px;
  color: rgba(243, 237, 223, 0.34);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.ambient-label svg {
  width: 17px;
  height: 17px;
}

.sound-list {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 6px;
}

.sound-chip {
  display: inline-flex;
  height: 29px;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  border: 1px solid rgba(243, 237, 223, 0.1);
  border-radius: 999px;
  background: rgba(243, 237, 223, 0.025);
  color: rgba(243, 237, 223, 0.45);
  font-size: 9.5px;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.sound-chip:hover {
  border-color: rgba(243, 237, 223, 0.2);
  color: rgba(243, 237, 223, 0.8);
}

.sound-chip[aria-pressed="true"] {
  border-color: rgba(243, 237, 223, 0.22);
  background: rgba(243, 237, 223, 0.1);
  color: var(--cream);
}

.sound-chip > svg {
  width: 14px;
  height: 14px;
}

.eq {
  display: none;
  height: 10px;
  align-items: flex-end;
  gap: 2px;
  margin-left: 1px;
}

.sound-chip[aria-pressed="true"] .eq {
  display: flex;
}

.eq b {
  display: block;
  width: 2px;
  height: 40%;
  border-radius: 1px;
  background: currentColor;
  animation: eq 0.85s ease-in-out infinite alternate;
}

.eq b:nth-child(2) { height: 100%; animation-delay: -0.35s; }
.eq b:nth-child(3) { height: 65%; animation-delay: -0.6s; }

@keyframes eq {
  from { transform: scaleY(0.3); }
  to { transform: scaleY(1); }
}

.mute-btn {
  display: grid;
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(243, 237, 223, 0.38);
  transition: color 0.2s, background 0.2s;
}

.mute-btn:hover {
  background: rgba(243, 237, 223, 0.08);
  color: var(--cream);
}

.mute-btn svg {
  width: 16px;
  height: 16px;
}

.mute-btn .volume-off {
  display: none;
}

.mute-btn[aria-pressed="true"] .volume-on {
  display: none;
}

.mute-btn[aria-pressed="true"] .volume-off {
  display: block;
}

.focus-card.is-flashing,
.insight-card.is-flashing {
  animation: card-flash 1.2s var(--ease);
}

@keyframes card-flash {
  0%, 100% { box-shadow: inherit; }
  35% { box-shadow: 0 0 0 3px rgba(215, 161, 123, 0.55), 0 22px 44px rgba(37, 53, 43, 0.18); }
}

/* Right column */
.right-column {
  display: grid;
  grid-template-rows: minmax(0, 1.55fr) minmax(180px, 0.78fr);
  gap: 20px;
  min-height: 0;
}

.tasks-card,
.insight-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(255, 255, 255, 0.7), transparent 54%),
    var(--paper-soft);
  box-shadow: 0 4px 20px rgba(47, 58, 46, 0.035), inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.tasks-card {
  display: flex;
  min-height: 0;
  flex-direction: column;
  padding: 23px 23px 17px;
}

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

.card-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.task-score {
  display: flex;
  align-items: baseline;
  gap: 2px;
  padding-top: 5px;
  color: #adb3a8;
  font-family: var(--serif);
  font-size: 12px;
}

.task-score strong {
  color: var(--forest);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.task-score b {
  font-weight: 400;
}

.progress-line {
  width: 100%;
  height: 3px;
  margin-top: 17px;
  overflow: hidden;
  border-radius: 99px;
  background: #e5e4d9;
}

.progress-line span {
  display: block;
  width: 50%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3f5c49, #6e8b70);
  transition: width 0.5s var(--ease);
}

.task-list {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  margin: 7px 0 2px;
  padding: 0;
  overflow-y: auto;
  list-style: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(37, 48, 40, 0.16) transparent;
}

.task-list::-webkit-scrollbar {
  width: 4px;
}

.task-list::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: rgba(37, 48, 40, 0.14);
}

.task-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10.5px 1px;
  border-bottom: 1px solid rgba(37, 48, 40, 0.075);
}

.task-item:last-child {
  border-bottom: 0;
}

.task-check {
  display: grid;
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1.5px solid #b8c0b3;
  border-radius: 50%;
  background: transparent;
  color: white;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.task-check svg {
  width: 11px;
  height: 11px;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.2s, transform 0.2s;
}

.task-check:hover {
  border-color: var(--forest);
  transform: scale(1.06);
}

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

.task-item.is-done .task-check svg {
  opacity: 1;
  transform: scale(1);
}

.task-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 8px;
}

.task-title {
  overflow: hidden;
  color: var(--ink);
  font-size: 12.5px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-item.is-done .task-title {
  color: #9ba297;
  text-decoration: line-through;
  text-decoration-color: #c4c9bf;
  text-decoration-thickness: 1px;
}

.task-tag {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(219, 226, 212, 0.7);
  color: #73816f;
  font-size: 8px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.task-item.is-done .task-tag {
  background: rgba(230, 229, 219, 0.76);
  color: #a5ab9f;
}

.task-delete {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #b0b6aa;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s, color 0.2s;
}

.task-delete svg {
  width: 12px;
  height: 12px;
}

.task-item:hover .task-delete,
.task-delete:focus-visible {
  opacity: 1;
}

.task-delete:hover {
  background: #eeece3;
  color: #7d6b5e;
}

.task-empty {
  display: grid;
  flex: 1;
  place-items: center;
  padding: 24px 0;
  color: #a0a69a;
  font-size: 11px;
  letter-spacing: 0.02em;
  text-align: center;
}

.add-task {
  flex: 0 0 auto;
  margin-top: 5px;
}

.add-trigger {
  display: flex;
  width: 100%;
  height: 36px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px dashed rgba(37, 48, 40, 0.16);
  border-radius: 10px;
  background: transparent;
  color: #949b90;
  font-size: 10.5px;
  text-align: left;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.add-trigger:hover {
  border-color: rgba(47, 70, 56, 0.3);
  background: rgba(255, 255, 255, 0.3);
  color: var(--ink-soft);
}

.add-plus {
  font-size: 15px;
  font-weight: 300;
  line-height: 1;
}

.add-input-wrap {
  display: flex;
  height: 38px;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  border: 1px solid rgba(47, 70, 56, 0.28);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.48);
  color: #818a7e;
}

.add-input-wrap[hidden] {
  display: none;
}

.add-input-wrap input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
}

.add-input-wrap input::placeholder {
  color: #a8aea3;
}

.add-submit {
  height: 24px;
  padding: 0 9px;
  border: 0;
  border-radius: 7px;
  background: var(--forest);
  color: var(--cream);
  font-size: 9px;
  transition: background 0.2s;
}

.add-submit:hover {
  background: var(--forest-deep);
}

.tasks-foot {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  color: #9aa197;
  font-size: 9px;
}

.tasks-foot-soft {
  color: #b3b8ae;
  letter-spacing: 0.1em;
}

/* Insight */
.insight-card {
  display: flex;
  min-height: 0;
  flex-direction: column;
  padding: 18px 22px 16px;
  background:
    radial-gradient(100% 100% at 100% 0%, rgba(226, 232, 218, 0.58), transparent 68%),
    var(--paper-soft);
}

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

.insight-head h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.15;
}

.trend-pill {
  padding: 4px 8px;
  border: 1px solid rgba(118, 144, 118, 0.16);
  border-radius: 999px;
  background: rgba(228, 235, 221, 0.7);
  color: #698168;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.week-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: 9px;
}

.week-number {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 27px;
  letter-spacing: -0.03em;
  line-height: 1;
}

.week-number span {
  margin: 0 1px 0 2px;
  color: #879186;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
}

.week-goal {
  color: #a0a69a;
  font-size: 8.5px;
  letter-spacing: 0.04em;
}

.bar-chart {
  display: flex;
  flex: 1;
  min-height: 65px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 9px;
  margin-top: 13px;
  padding-top: 5px;
  border-bottom: 1px solid rgba(37, 48, 40, 0.07);
}

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

.chart-col i {
  display: block;
  width: 100%;
  max-width: 26px;
  height: max(4px, var(--bar));
  min-height: 4px;
  border-radius: 5px 5px 2px 2px;
  background: var(--sage-deep);
  transition: height 0.5s var(--ease), background 0.3s;
}

.chart-col span {
  padding-bottom: 6px;
  color: #a2a99d;
  font-size: 8px;
  line-height: 1;
}

.chart-col.is-today i {
  background: linear-gradient(180deg, #46664f, var(--forest));
  box-shadow: 0 3px 8px rgba(47, 70, 56, 0.15);
}

.chart-col.is-today span {
  color: var(--forest);
  font-weight: 600;
}

.chart-col.is-empty i {
  background: #eceade;
}

.chart-col.is-empty span {
  color: #b8bdb3;
}

/* Footer */
.main-foot {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 44px;
  padding: 10px 2px 0;
}

.quote {
  margin: 0;
  color: #a3a99d;
  font-family: var(--serif);
  font-size: 10.5px;
  letter-spacing: 0.08em;
}

.shortcut-hint {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: #b0b5aa;
  font-size: 8.5px;
  letter-spacing: 0.02em;
}

.shortcut-hint span {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #c1c5bb;
}

kbd {
  display: inline-grid;
  min-width: 20px;
  height: 18px;
  place-items: center;
  padding: 0 4px;
  border: 1px solid rgba(37, 48, 40, 0.1);
  border-bottom-color: rgba(37, 48, 40, 0.18);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.42);
  color: #92998e;
  font-family: var(--sans);
  font-size: 7.5px;
  line-height: 1;
}

/* Toast */
.toast {
  position: fixed;
  z-index: 50;
  display: flex;
  height: 47px;
  align-items: center;
  gap: 9px;
  left: 50%;
  bottom: 28px;
  padding: 0 17px 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(35, 54, 43, 0.96);
  box-shadow: 0 14px 34px rgba(29, 43, 33, 0.25);
  color: var(--cream);
  font-size: 10.5px;
  letter-spacing: 0.02em;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 15px) scale(0.97);
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease);
  white-space: nowrap;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.toast-mark {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 50%;
  background: rgba(243, 237, 223, 0.12);
  color: var(--cream);
}

.toast-mark svg {
  width: 15px;
  height: 15px;
}

/* Responsive */
@media (max-width: 1180px) {
  .app {
    grid-template-columns: 206px minmax(0, 1fr);
    width: calc(100vw - 28px);
    margin: 14px auto;
    min-height: calc(100vh - 28px);
  }

  .sidebar {
    padding: 24px 15px 18px;
  }

  .main {
    padding: 42px 26px 16px;
  }

  .dashboard {
    grid-template-columns: minmax(0, 1.4fr) minmax(310px, 0.9fr);
    gap: 16px;
  }

  .focus-card {
    min-height: 590px;
    padding: 23px 22px 17px;
  }

  .timer-stage {
    width: min(285px, 62%);
  }

  .right-column {
    gap: 16px;
  }

  .sound-chip {
    padding: 0 8px;
  }

  .top-actions {
    gap: 7px;
  }

  .date-chip {
    display: none;
  }
}

@media (max-width: 920px) {
  body {
    overflow: auto;
  }

  .app {
    display: block;
    width: calc(100vw - 24px);
    min-height: calc(100vh - 24px);
    margin: 12px auto;
  }

  .sidebar {
    display: flex;
    min-height: auto;
    align-items: center;
    flex-direction: row;
    gap: 14px;
    padding: 14px 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand {
    margin: 0 8px 0 0;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .brand-mark svg {
    width: 23px;
    height: 23px;
  }

  .brand-copy strong {
    font-size: 19px;
  }

  .brand-copy small {
    display: none;
  }

  .nav {
    display: flex;
    min-width: 0;
    flex: 1;
    align-items: center;
    gap: 2px;
    margin: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav-label,
  .nav-label--spaced,
  .sidebar-bottom,
  .nav-item svg {
    display: none;
  }

  .nav-item {
    width: auto;
    flex: 0 0 auto;
    margin: 0;
    padding: 8px 11px;
    font-size: 11px;
  }

  .nav-dot {
    display: none !important;
  }

  .main {
    padding: 28px 22px 16px;
  }

  .topbar {
    margin-bottom: 20px;
  }

  .top-actions {
    padding-top: 12px;
  }

  .dashboard {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .focus-card {
    min-height: 600px;
  }

  .right-column {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    gap: 16px;
  }

  .tasks-card {
    min-height: 330px;
  }

  .insight-card {
    min-height: 260px;
  }

  .main-foot {
    min-height: 40px;
  }
}

@media (max-width: 640px) {
  .app {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .sidebar {
    gap: 6px;
    padding: 12px 14px;
    overflow: hidden;
  }

  .brand-copy {
    display: none;
  }

  .nav {
    justify-content: flex-end;
  }

  .nav-item {
    padding: 7px 9px;
    font-size: 10px;
  }

  .main {
    padding: 24px 16px 18px;
  }

  .eyebrow {
    font-size: 8px;
    letter-spacing: 0.13em;
  }

  .greeting h1 {
    font-size: 26px;
  }

  .greeting-sub {
    max-width: 240px;
    font-size: 10px;
    line-height: 1.6;
  }

  .top-actions {
    gap: 5px;
    padding-top: 10px;
  }

  .streak-chip {
    height: 31px;
    gap: 4px;
    padding: 0 9px;
    font-size: 9px;
  }

  .streak-chip svg {
    width: 13px;
    height: 13px;
  }

  .streak-chip strong {
    font-size: 11px;
  }

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

  .focus-card {
    min-height: 565px;
    padding: 19px 16px 15px;
    border-radius: 22px;
  }

  .mode-btn {
    padding: 6px 12px;
    font-size: 10px;
  }

  .rounds {
    gap: 7px;
    font-size: 8px;
  }

  .timer-stage {
    width: min(272px, 78%);
    margin-top: 18px;
  }

  .timer-time {
    font-size: 54px;
  }

  .ambient-bar {
    gap: 7px;
  }

  .ambient-label {
    font-size: 0;
  }

  .ambient-label svg {
    width: 18px;
    height: 18px;
  }

  .sound-list {
    gap: 4px;
  }

  .sound-chip {
    gap: 4px;
    padding: 0 8px;
    font-size: 9px;
  }

  .sound-chip > svg {
    display: none;
  }

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

  .tasks-card {
    min-height: 330px;
    padding: 20px 18px 15px;
  }

  .insight-card {
    min-height: 230px;
  }

  .main-foot {
    justify-content: center;
  }

  .shortcut-hint,
  .quote {
    font-size: 9px;
  }

  .shortcut-hint {
    display: none;
  }

  .toast {
    max-width: calc(100vw - 32px);
    overflow: hidden;
    font-size: 9.5px;
    text-overflow: ellipsis;
  }
}

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