:root {
  --paper: #f7f4ed;
  --paper-deep: #eee9dd;
  --ink: #243733;
  --ink-soft: #66746f;
  --white: #fffefa;
  --coral: #f27863;
  --coral-dark: #d85c4a;
  --coral-pale: #fee4dc;
  --blue: #70a9c6;
  --blue-pale: #dceef5;
  --green: #78a67b;
  --green-pale: #e1efe0;
  --yellow: #efbd62;
  --yellow-pale: #faedc9;
  --purple: #9a8ec3;
  --purple-pale: #e8e3f5;
  --line: #ded9cd;
  --shadow: 0 18px 45px rgb(63 55 41 / 7%);
  --shadow-small: 0 8px 24px rgb(63 55 41 / 8%);
  --radius-large: 30px;
  --radius-medium: 20px;
  --font-sans: "Avenir Next", Avenir, "Hiragino Sans", "Yu Gothic", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 82% 4%, rgb(246 210 178 / 34%), transparent 26rem),
    var(--paper);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

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

button,
select {
  cursor: pointer;
}

button {
  border: 0;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid rgb(112 169 198 / 50%);
  outline-offset: 3px;
}

svg {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.sr-only {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  border: 0;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  color: #fff;
  background: var(--ink);
  transform: translateY(-150%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 250px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  width: 250px;
  height: 100vh;
  padding: 34px 24px 26px;
  border-right: 1px solid rgb(191 182 165 / 55%);
  background: rgb(250 248 242 / 78%);
  backdrop-filter: blur(18px);
  flex-direction: column;
}

.brand {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 750;
  letter-spacing: -0.04em;
  text-decoration: none;
  gap: 10px;
}

.brand-mark {
  position: relative;
  display: inline-flex;
  width: 34px;
  height: 31px;
  border: 2px solid var(--ink);
  border-radius: 47% 53% 48% 52% / 55% 45% 55% 45%;
  background: var(--coral-pale);
  align-items: center;
  justify-content: center;
  gap: 5px;
  transform: rotate(-3deg);
}

.brand-mark::after {
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 7px;
  height: 3px;
  border-bottom: 1.7px solid var(--ink);
  border-radius: 50%;
  content: "";
}

.brand-eye {
  width: 3px;
  height: 4px;
  border-radius: 50%;
  background: var(--ink);
}

.side-nav {
  display: grid;
  margin-top: 54px;
  gap: 8px;
}

.nav-item {
  display: grid;
  width: 100%;
  min-height: 48px;
  padding: 8px 12px;
  border-radius: 14px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 0.91rem;
  font-weight: 650;
  text-align: left;
  align-items: center;
  grid-template-columns: 26px 1fr auto;
  gap: 10px;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-item:hover {
  color: var(--ink);
  background: rgb(255 255 255 / 60%);
  transform: translateX(2px);
}

.nav-item.is-active {
  color: var(--ink);
  background: var(--white);
  box-shadow: var(--shadow-small);
}

.nav-icon {
  display: grid;
  width: 25px;
  height: 25px;
  border-radius: 9px;
  background: var(--paper-deep);
  place-items: center;
}

.nav-item.is-active .nav-icon {
  color: var(--coral-dark);
  background: var(--coral-pale);
}

.nav-icon svg {
  width: 15px;
  height: 15px;
}

.nav-count {
  min-width: 22px;
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--ink-soft);
  background: var(--paper-deep);
  font-size: 0.7rem;
  text-align: center;
}

.sidebar-spacer {
  flex: 1;
}

.tiny-cheer {
  position: relative;
  overflow: hidden;
  padding: 20px 16px;
  border: 1px dashed #d6cdbd;
  border-radius: 19px;
  margin-bottom: 18px;
  background: rgb(255 254 250 / 45%);
}

.tiny-cheer p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1.75;
}

.tiny-cheer-sun {
  position: absolute;
  top: 12px;
  right: 14px;
  color: var(--yellow);
  font-size: 2.1rem;
  transform: rotate(12deg);
}

.sidebar-button {
  display: flex;
  padding: 8px 10px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 0.76rem;
  font-weight: 600;
  align-items: center;
  gap: 9px;
}

.sidebar-button + .sidebar-button {
  margin-top: 2px;
}

.sidebar-button:hover {
  color: var(--ink);
}

.sidebar-button svg {
  width: 16px;
  height: 16px;
}

.main-content {
  width: 100%;
  max-width: 1380px;
  padding: 35px clamp(28px, 5vw, 76px) 80px;
  margin: 0 auto;
}

.topbar {
  display: flex;
  min-height: 56px;
  margin-bottom: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--ink-soft);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.11em;
}

.topbar h1 {
  margin: 0;
  font-size: clamp(1.18rem, 2vw, 1.45rem);
  font-weight: 740;
  letter-spacing: -0.04em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.add-button,
.secondary-button,
.primary-button,
.ghost-button {
  display: inline-flex;
  min-height: 46px;
  padding: 0 17px;
  border-radius: 14px;
  font-size: 0.82rem;
  font-weight: 700;
  align-items: center;
  justify-content: center;
  gap: 9px;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.add-button,
.primary-button {
  color: #fff;
  background: var(--ink);
  box-shadow: 0 8px 18px rgb(36 55 51 / 16%);
}

.add-button:hover,
.primary-button:hover {
  background: #162b27;
  box-shadow: 0 12px 25px rgb(36 55 51 / 22%);
  transform: translateY(-2px);
}

.add-button svg,
.secondary-button svg {
  width: 17px;
  height: 17px;
}

.add-button kbd {
  padding: 2px 5px;
  border: 1px solid rgb(255 255 255 / 24%);
  border-radius: 5px;
  color: rgb(255 255 255 / 60%);
  font-family: inherit;
  font-size: 0.61rem;
}

.mobile-only,
.mobile-nav {
  display: none;
}

.view {
  display: none;
  animation: view-in 260ms ease both;
}

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

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

.day-hero {
  position: relative;
  display: grid;
  overflow: hidden;
  min-height: 340px;
  padding: clamp(38px, 5vw, 62px) clamp(34px, 6vw, 78px);
  border: 1px solid rgb(255 255 255 / 70%);
  border-radius: var(--radius-large);
  background:
    radial-gradient(circle at 81% 20%, rgb(255 255 255 / 80%) 0 5%, transparent 30%),
    linear-gradient(125deg, #f8dfd3 0%, #f5e9d6 52%, #dae9e4 100%);
  box-shadow: var(--shadow);
  align-items: center;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 0.6fr);
  gap: 40px;
}

.day-hero::before {
  position: absolute;
  top: -90px;
  left: 42%;
  width: 220px;
  height: 220px;
  border: 1px solid rgb(255 255 255 / 60%);
  border-radius: 50%;
  content: "";
}

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

.hero-kicker,
.section-label {
  display: block;
  color: var(--coral-dark);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.hero-kicker span {
  margin-right: 5px;
}

.hero-copy h2 {
  max-width: 650px;
  margin: 13px 0 10px;
  font-size: clamp(2.15rem, 4.3vw, 4rem);
  font-weight: 750;
  letter-spacing: -0.075em;
  line-height: 1.12;
}

.hero-copy > p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.quick-add {
  display: flex;
  width: min(100%, 530px);
  height: 52px;
  padding: 5px 6px 5px 15px;
  border: 1px solid rgb(255 255 255 / 90%);
  border-radius: 17px;
  margin-top: 28px;
  background: rgb(255 255 255 / 76%);
  box-shadow: 0 11px 25px rgb(90 75 52 / 8%);
  backdrop-filter: blur(10px);
  align-items: center;
  gap: 8px;
  transition: background 160ms ease, box-shadow 160ms ease;
}

.quick-add:focus-within {
  background: #fff;
  box-shadow: 0 12px 30px rgb(90 75 52 / 13%);
}

.quick-add-plus {
  color: var(--coral-dark);
  font-size: 1.25rem;
}

.quick-add input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 0.88rem;
}

.quick-add input::placeholder {
  color: #8c9691;
}

.quick-add button {
  min-width: 58px;
  height: 40px;
  border-radius: 12px;
  color: #fff;
  background: var(--coral);
  font-size: 0.75rem;
  font-weight: 700;
}

.quick-add button:hover {
  background: var(--coral-dark);
}

.progress-orbit {
  position: relative;
  display: grid;
  width: min(100%, 250px);
  aspect-ratio: 1;
  margin: auto;
  place-items: center;
}

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

.progress-track,
.progress-value {
  fill: none;
  stroke-width: 8;
}

.progress-track {
  stroke: rgb(255 255 255 / 66%);
}

.progress-value {
  stroke: var(--coral);
  stroke-dasharray: 439.82;
  stroke-dashoffset: 439.82;
  stroke-linecap: round;
  transition: stroke-dashoffset 650ms cubic-bezier(0.23, 1, 0.32, 1);
}

.progress-center {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.progress-center strong {
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  font-weight: 740;
  letter-spacing: -0.07em;
}

.progress-center span {
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.orbit-doodle {
  position: absolute;
  z-index: 2;
  color: var(--yellow);
}

.orbit-doodle-one {
  top: 19px;
  left: 10px;
  font-size: 1.8rem;
  transform: rotate(-13deg);
}

.orbit-doodle-two {
  right: 10px;
  bottom: 50px;
  color: var(--blue);
  font-size: 0.65rem;
}

.orbit-face {
  position: absolute;
  right: 21px;
  bottom: 26px;
  display: flex;
  width: 50px;
  height: 38px;
  border: 2px solid var(--ink);
  border-radius: 48% 52% 48% 52%;
  background: var(--yellow-pale);
  align-items: center;
  justify-content: center;
  gap: 7px;
  transform: rotate(8deg);
}

.orbit-face i,
.mascot-body i {
  width: 3px;
  height: 4px;
  border-radius: 50%;
  background: var(--ink);
}

.orbit-face b,
.mascot-body b {
  position: absolute;
  bottom: 8px;
  width: 8px;
  height: 4px;
  border-bottom: 2px solid var(--ink);
  border-radius: 50%;
}

.today-grid {
  display: grid;
  margin-top: 24px;
  grid-template-columns: minmax(0, 1.65fr) minmax(250px, 0.7fr);
  gap: 24px;
}

.content-card {
  border: 1px solid rgb(214 208 196 / 68%);
  border-radius: var(--radius-large);
  background: rgb(255 254 250 / 76%);
  box-shadow: var(--shadow);
}

.task-card {
  min-height: 340px;
  padding: 30px 30px 24px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.section-heading h2,
.page-intro h2,
.encouragement-card h2 {
  margin: 7px 0 0;
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
  font-weight: 740;
  letter-spacing: -0.055em;
}

.section-count {
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--ink-soft);
  background: var(--paper-deep);
  font-size: 0.68rem;
  font-weight: 700;
}

.task-list {
  display: grid;
  margin-top: 20px;
  gap: 4px;
}

.task-toolbar {
  display: flex;
  padding: 10px;
  border: 1px solid #e8e3d9;
  border-radius: 15px;
  margin-top: 20px;
  background: var(--paper);
  gap: 7px;
}

.task-toolbar label {
  min-width: 0;
}

.task-toolbar select {
  width: 100%;
  height: 34px;
  padding: 0 30px 0 10px;
  border: 0;
  border-radius: 10px;
  outline: 0;
  color: var(--ink-soft);
  background: var(--white);
  font-size: 0.66rem;
  font-weight: 650;
}

.task-toolbar select:hover {
  color: var(--ink);
}

.task-toolbar .sort-control {
  margin-left: auto;
}

.planned-toolbar {
  max-width: 720px;
  margin: 22px 0 0 auto;
  background: rgb(255 254 250 / 72%);
}

.task-item {
  position: relative;
  display: grid;
  min-height: 62px;
  padding: 9px 4px;
  border-bottom: 1px solid #ebe7de;
  align-items: center;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  animation: item-in 220ms ease both;
}

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

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

.task-check {
  display: grid;
  width: 24px;
  height: 24px;
  border: 1.8px solid #b9b8af;
  border-radius: 8px;
  background: #fff;
  place-items: center;
  transition: border 160ms ease, background 160ms ease, transform 160ms ease;
}

.task-check:hover {
  border-color: var(--coral);
  transform: scale(1.08) rotate(-3deg);
}

.task-check svg {
  width: 14px;
  height: 14px;
  color: #fff;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 160ms ease, transform 160ms ease;
}

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

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

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

.task-title {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-item.is-completed .task-title {
  color: #8a938f;
  text-decoration: line-through;
  text-decoration-color: #aab4af;
}

.task-meta {
  display: flex;
  margin-top: 5px;
  color: #83908b;
  font-size: 0.66rem;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.task-goal-chip {
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--paper-deep);
  font-weight: 650;
}

.task-date.is-overdue {
  color: var(--coral-dark);
  font-weight: 700;
}

.priority-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--coral);
}

.task-edit-button {
  display: grid;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #98a29e;
  background: transparent;
  place-items: center;
  opacity: 0;
  transition: opacity 160ms ease, background 160ms ease;
}

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

.task-edit-button:hover {
  color: var(--ink);
  background: var(--paper-deep);
}

.task-edit-button svg {
  width: 16px;
  height: 16px;
}

.empty-state {
  display: grid;
  min-height: 190px;
  padding: 24px;
  color: var(--ink-soft);
  text-align: center;
  place-items: center;
}

.empty-state-inner {
  max-width: 330px;
}

.empty-illustration {
  display: grid;
  width: 58px;
  height: 58px;
  border: 2px solid var(--ink);
  border-radius: 48% 52% 45% 55%;
  margin: 0 auto 13px;
  background: var(--green-pale);
  font-size: 1.45rem;
  place-items: center;
  transform: rotate(-4deg);
}

.empty-state strong {
  display: block;
  color: var(--ink);
  font-size: 0.92rem;
}

.empty-state p {
  margin: 7px 0 0;
  font-size: 0.76rem;
  line-height: 1.65;
}

.encouragement-card {
  position: relative;
  display: flex;
  overflow: hidden;
  min-height: 340px;
  padding: 28px;
  background: linear-gradient(150deg, #dcecf0, #e8efdf 80%);
  text-align: center;
  align-items: center;
  flex-direction: column;
}

.encouragement-card .section-label {
  align-self: flex-start;
  color: #5d8884;
}

.mascot {
  position: relative;
  display: grid;
  width: 100px;
  height: 96px;
  margin: 22px 0 4px;
  place-items: end center;
}

.mascot-body {
  position: relative;
  z-index: 2;
  display: flex;
  width: 81px;
  height: 67px;
  border: 2px solid var(--ink);
  border-radius: 48% 52% 44% 56% / 52% 44% 56% 48%;
  background: #f8d9ae;
  box-shadow: inset -8px -8px 0 rgb(231 176 123 / 22%);
  align-items: center;
  justify-content: center;
  gap: 13px;
}

.mascot-body i {
  width: 4px;
  height: 5px;
}

.mascot-body b {
  bottom: 18px;
  width: 12px;
  height: 7px;
}

.mascot-leaf {
  position: absolute;
  z-index: 1;
  top: 6px;
  width: 31px;
  height: 47px;
  border: 2px solid var(--ink);
  border-radius: 80% 20% 70% 30%;
  background: #91b980;
}

.leaf-one {
  left: 24px;
  transform: rotate(-30deg);
}

.leaf-two {
  right: 21px;
  border-radius: 20% 80% 30% 70%;
  transform: rotate(30deg);
}

.encouragement-card h2 {
  position: relative;
  z-index: 1;
  font-size: 1.25rem;
}

.encouragement-card > p {
  position: relative;
  z-index: 1;
  margin: 9px 0 14px;
  color: var(--ink-soft);
  font-size: 0.76rem;
  line-height: 1.7;
}

.streak-pill {
  position: relative;
  z-index: 1;
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgb(255 255 255 / 56%);
  color: var(--ink-soft);
  font-size: 0.7rem;
  align-items: center;
  gap: 4px;
}

.streak-pill strong {
  color: var(--ink);
}

.cloud-doodle {
  position: absolute;
  width: 78px;
  height: 26px;
  border-radius: 50px;
  background: rgb(255 255 255 / 28%);
}

.cloud-one {
  top: 46px;
  right: -18px;
}

.cloud-two {
  bottom: 20px;
  left: -27px;
}

.goals-preview {
  margin-top: 52px;
}

.goals-heading {
  align-items: center;
}

.text-button,
.danger-text-button {
  padding: 7px 2px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 0.77rem;
  font-weight: 700;
}

.text-button:hover {
  color: var(--coral-dark);
}

.goal-grid {
  display: grid;
  margin-top: 20px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.goal-card {
  --goal-color: var(--coral);
  --goal-pale: var(--coral-pale);
  position: relative;
  overflow: hidden;
  min-height: 205px;
  padding: 22px;
  border: 1px solid rgb(214 208 196 / 60%);
  border-radius: 23px;
  background: var(--white);
  box-shadow: var(--shadow-small);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.goal-card:hover {
  box-shadow: 0 16px 32px rgb(63 55 41 / 11%);
  transform: translateY(-3px) rotate(-0.2deg);
}

.goal-card[data-color="blue"] { --goal-color: var(--blue); --goal-pale: var(--blue-pale); }
.goal-card[data-color="green"] { --goal-color: var(--green); --goal-pale: var(--green-pale); }
.goal-card[data-color="yellow"] { --goal-color: var(--yellow); --goal-pale: var(--yellow-pale); }
.goal-card[data-color="purple"] { --goal-color: var(--purple); --goal-pale: var(--purple-pale); }

.goal-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.goal-emoji {
  display: grid;
  width: 43px;
  height: 43px;
  border-radius: 14px 16px 13px 17px;
  background: var(--goal-pale);
  font-size: 1.25rem;
  place-items: center;
  transform: rotate(-3deg);
}

.goal-edit-button {
  display: grid;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  color: #949d99;
  background: transparent;
  place-items: center;
}

.goal-edit-button:hover {
  color: var(--ink);
  background: var(--paper-deep);
}

.goal-card h3 {
  margin: 17px 0 7px;
  font-size: 1rem;
  font-weight: 720;
  letter-spacing: -0.035em;
}

.goal-card-meta {
  display: flex;
  color: var(--ink-soft);
  font-size: 0.66rem;
  gap: 8px;
}

.goal-progress {
  margin-top: 24px;
}

.goal-progress-label {
  display: flex;
  margin-bottom: 7px;
  color: var(--ink-soft);
  font-size: 0.65rem;
  font-weight: 650;
  justify-content: space-between;
}

.goal-progress-label strong {
  color: var(--goal-color);
}

.goal-progress-track {
  overflow: hidden;
  height: 7px;
  border-radius: 999px;
  background: var(--goal-pale);
}

.goal-progress-value {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--goal-color);
  transition: width 600ms ease;
}

.goal-why {
  margin: 13px 0 0;
  color: var(--ink-soft);
  font-size: 0.72rem;
  line-height: 1.55;
}

.goal-empty-card {
  display: grid;
  min-height: 205px;
  padding: 22px;
  border: 1.5px dashed #cdc6b8;
  border-radius: 23px;
  color: var(--ink-soft);
  background: rgb(255 254 250 / 35%);
  text-align: center;
  place-items: center;
}

.goal-empty-card button {
  color: var(--coral-dark);
  background: transparent;
  font-size: 0.78rem;
  font-weight: 750;
}

.insights-intro {
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 22%, rgb(255 255 255 / 55%), transparent 12rem),
    linear-gradient(120deg, #dcece8, #efe6d1 70%, #f4dbd4);
}

.wins-badge {
  position: relative;
  display: flex;
  width: 170px;
  height: 170px;
  border: 1px solid rgb(255 255 255 / 70%);
  border-radius: 52% 48% 54% 46% / 48% 52% 46% 54%;
  background: rgb(255 254 250 / 65%);
  box-shadow: inset 0 0 0 8px rgb(255 255 255 / 24%);
  align-items: center;
  flex: 0 0 auto;
  flex-direction: column;
  justify-content: center;
  transform: rotate(3deg);
}

.wins-badge::before,
.wins-badge::after {
  position: absolute;
  color: var(--coral);
  content: "✦";
}

.wins-badge::before {
  top: 10px;
  left: 6px;
  font-size: 1.25rem;
}

.wins-badge::after {
  right: 13px;
  bottom: 24px;
  color: var(--yellow);
  font-size: 0.85rem;
}

.wins-badge span,
.wins-badge small {
  color: var(--ink-soft);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.wins-badge strong {
  margin: 5px 0 2px;
  color: var(--coral-dark);
  font-size: 3.7rem;
  font-weight: 730;
  letter-spacing: -0.09em;
  line-height: 1;
}

.period-stats {
  margin-top: 48px;
}

.insights-heading {
  align-items: flex-end;
}

.insights-heading > p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.7rem;
}

.period-grid {
  display: grid;
  margin-top: 20px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
}

.period-card {
  --rate-color: #a8b1ad;
  --rate-pale: #eeeae1;
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 20px;
  border: 1px solid rgb(214 208 196 / 62%);
  border-radius: 23px;
  background: linear-gradient(150deg, var(--white), var(--rate-pale));
  box-shadow: var(--shadow-small);
}

.period-card.rate-low { --rate-color: #d57c69; --rate-pale: #f7ded7; }
.period-card.rate-growing { --rate-color: #ca9b47; --rate-pale: #f8edcb; }
.period-card.rate-good { --rate-color: #6e9f87; --rate-pale: #dfeee5; }
.period-card.rate-great { --rate-color: #4f9180; --rate-pale: #d1ebe4; }

.period-card::after {
  position: absolute;
  right: -35px;
  bottom: -50px;
  width: 120px;
  height: 120px;
  border: 18px solid rgb(255 255 255 / 28%);
  border-radius: 50%;
  content: "";
}

.period-card-label {
  color: var(--ink-soft);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.07em;
}

.period-card strong {
  display: block;
  margin: 19px 0 6px;
  color: var(--rate-color);
  font-size: 2.9rem;
  font-weight: 730;
  letter-spacing: -0.08em;
  line-height: 1;
}

.period-card-meta {
  color: var(--ink-soft);
  font-size: 0.65rem;
}

.period-mini-track {
  overflow: hidden;
  height: 6px;
  border-radius: 999px;
  margin-top: 19px;
  background: rgb(255 255 255 / 72%);
}

.period-mini-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--rate-color);
}

.period-comment {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 0.62rem;
  font-weight: 650;
}

.insights-grid {
  display: grid;
  margin-top: 24px;
  grid-template-columns: minmax(0, 1.45fr) minmax(270px, 0.75fr);
  gap: 24px;
}

.heatmap-card,
.breakdown-card {
  min-height: 330px;
  padding: 28px;
}

.heatmap {
  display: grid;
  margin-top: 28px;
  grid-template-columns: repeat(14, minmax(16px, 1fr));
  gap: 7px;
}

.heatmap-day {
  position: relative;
  border-radius: 7px;
  background: #e9e5dc;
  aspect-ratio: 1;
}

.heatmap-day[data-level="1"] { background: #f6d8cd; }
.heatmap-day[data-level="2"] { background: #f1c177; }
.heatmap-day[data-level="3"] { background: #a9c9ad; }
.heatmap-day[data-level="4"] { background: #6f9d83; }

.heatmap-day:hover::after {
  position: absolute;
  z-index: 5;
  bottom: calc(100% + 7px);
  left: 50%;
  width: max-content;
  max-width: 180px;
  padding: 6px 8px;
  border-radius: 8px;
  color: #fff;
  background: var(--ink);
  content: attr(data-label);
  font-size: 0.58rem;
  transform: translateX(-50%);
}

.heatmap-legend {
  display: flex;
  margin-top: 16px;
  color: var(--ink-soft);
  font-size: 0.58rem;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.heatmap-legend i {
  display: block;
  width: 11px;
  height: 11px;
  border-radius: 3px;
}

.heatmap-legend i[data-level="1"] { background: #f6d8cd; }
.heatmap-legend i[data-level="2"] { background: #f1c177; }
.heatmap-legend i[data-level="3"] { background: #a9c9ad; }
.heatmap-legend i[data-level="4"] { background: #6f9d83; }

.breakdown-list {
  display: grid;
  margin-top: 24px;
  gap: 14px;
}

.breakdown-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.breakdown-name {
  display: flex;
  overflow: hidden;
  font-size: 0.73rem;
  font-weight: 680;
  align-items: center;
  gap: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breakdown-name i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.breakdown-rate {
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 750;
}

.breakdown-track {
  overflow: hidden;
  height: 5px;
  border-radius: 999px;
  background: var(--paper-deep);
  grid-column: 1 / -1;
}

.breakdown-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.completed-link-card {
  display: flex;
  width: 100%;
  min-height: 90px;
  padding: 20px 25px;
  border: 1px dashed #c9c1b4;
  border-radius: 21px;
  margin-top: 24px;
  color: var(--ink);
  background: rgb(255 254 250 / 42%);
  text-align: left;
  align-items: center;
  justify-content: space-between;
}

.completed-link-card:hover {
  border-style: solid;
  background: var(--white);
}

.completed-link-card > span:first-child {
  display: grid;
  gap: 5px;
}

.completed-link-card strong {
  font-size: 0.85rem;
}

.completed-link-card small {
  color: var(--ink-soft);
  font-size: 0.66rem;
}

.goal-empty-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 0.88rem;
}

.page-intro {
  display: flex;
  min-height: 260px;
  padding: 42px clamp(28px, 5vw, 54px);
  border-radius: var(--radius-large);
  background: linear-gradient(120deg, #e5eee0, #f2e7d3);
  align-items: center;
  justify-content: space-between;
  gap: 36px;
}

.page-intro h2 {
  max-width: 650px;
  font-size: clamp(2rem, 4.4vw, 3.8rem);
  line-height: 1.12;
}

.page-intro p {
  max-width: 620px;
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 0.85rem;
  line-height: 1.8;
}

.secondary-button {
  flex: 0 0 auto;
  color: var(--ink);
  background: var(--white);
  box-shadow: var(--shadow-small);
}

.secondary-button:hover {
  transform: translateY(-2px);
}

.goal-grid-full {
  margin-top: 26px;
}

.compact-intro {
  min-height: 190px;
  background: linear-gradient(120deg, #e3edf1, #eee7d9);
}

.compact-intro h2 {
  font-size: clamp(2rem, 4.4vw, 3.2rem);
}

.planned-groups {
  display: grid;
  margin-top: 24px;
  gap: 18px;
}

.planned-group {
  padding: 28px 30px;
  border: 1px solid rgb(214 208 196 / 68%);
  border-radius: var(--radius-large);
  background: var(--white);
  box-shadow: var(--shadow);
}

.planned-group h3 {
  display: flex;
  margin: 0;
  font-size: 0.85rem;
  align-items: center;
  gap: 8px;
}

.planned-group h3 span {
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 600;
}

.completed-intro {
  background: linear-gradient(120deg, #f7dfd6, #f2ebd9);
}

.completed-total {
  display: flex;
  min-width: 130px;
  flex-direction: column;
  align-items: center;
}

.completed-total strong {
  color: var(--coral-dark);
  font-size: 3.7rem;
  font-weight: 720;
  letter-spacing: -0.08em;
  line-height: 1;
}

.completed-total span {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 0.65rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.completed-card {
  min-height: 250px;
  padding: 24px 30px;
  margin-top: 24px;
}

.modal {
  width: min(92vw, 610px);
  max-height: 90vh;
  padding: 0;
  border: 0;
  border-radius: 27px;
  background: transparent;
  box-shadow: 0 30px 90px rgb(26 41 37 / 25%);
}

.modal::backdrop {
  background: rgb(30 43 40 / 45%);
  backdrop-filter: blur(5px);
}

.modal[open] {
  animation: modal-in 220ms ease both;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(15px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-card {
  overflow-y: auto;
  max-height: 90vh;
  padding: 30px;
  border-radius: 27px;
  background: var(--white);
}

.modal-header {
  display: flex;
  margin-bottom: 26px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.modal-header h2 {
  margin: 6px 0 0;
  font-size: 1.65rem;
  letter-spacing: -0.055em;
}

.close-button,
.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  color: var(--ink-soft);
  background: var(--paper);
  font-size: 1.3rem;
  place-items: center;
}

.close-button:hover,
.icon-button:hover {
  color: var(--ink);
  background: var(--paper-deep);
}

.form-field {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.form-field > span,
.form-field-head > label,
.priority-picker > span,
.color-picker legend {
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 720;
}

.form-field-head {
  display: flex;
  min-height: 22px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.inline-new-button,
.field-label-with-action button {
  min-height: 27px;
  padding: 0 8px;
  border-radius: 8px;
  color: var(--blue-deep);
  background: rgb(112 169 198 / 12%);
  font-size: 0.63rem;
  font-weight: 750;
}

.inline-new-button:hover,
.field-label-with-action button:hover {
  background: rgb(112 169 198 / 22%);
}

.form-field small {
  font-weight: 500;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: 0;
  background: #fff;
  font-size: 0.83rem;
  transition: border 160ms ease, box-shadow 160ms ease;
}

.form-field input,
.form-field select {
  height: 47px;
  padding: 0 13px;
}

.form-field textarea {
  min-height: 90px;
  padding: 12px 13px;
  resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgb(112 169 198 / 14%);
}

.form-field-large > input {
  height: 53px;
  font-size: 0.93rem;
}

.form-row {
  display: grid;
  margin: 18px 0;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.classification-card {
  padding: 16px;
  border: 1px solid #e8e3d9;
  border-radius: 18px;
  margin: 18px 0;
  background: #fbfaf6;
}

.classification-card-heading,
.classification-creator-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.classification-card-heading > div,
.classification-creator-heading > div {
  display: grid;
  gap: 3px;
}

.classification-card-heading > div > span,
.classification-creator-heading strong {
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 780;
}

.classification-card-heading small,
.classification-creator-heading small {
  color: var(--ink-soft);
  font-size: 0.64rem;
  line-height: 1.55;
}

.optional-badge {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  color: #6f695f;
  background: var(--paper-deep);
  font-size: 0.57rem;
  font-weight: 700;
}

.classification-row {
  margin: 13px 0 0;
}

.classification-creator {
  padding: 15px;
  border: 1px solid rgb(112 169 198 / 30%);
  border-radius: 15px;
  margin-top: 14px;
  background: #fff;
  box-shadow: 0 10px 26px rgb(38 61 56 / 7%);
  animation: view-in 180ms ease both;
}

.classification-creator-heading {
  margin-bottom: 13px;
}

.mini-close-button {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 9px;
  color: var(--ink-soft);
  background: var(--paper);
  place-items: center;
}

.creator-form-row {
  margin: 0;
}

.classification-creator-actions {
  display: grid;
  margin-top: 13px;
  align-items: center;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
}

.text-action-button {
  color: var(--blue-deep);
  background: transparent;
  font-size: 0.65rem;
  font-weight: 720;
}

.creator-save-button,
.project-client-quick-add button {
  min-height: 39px;
  padding: 0 14px;
  border-radius: 11px;
  color: #fff;
  background: var(--ink);
  font-size: 0.68rem;
  font-weight: 750;
}

.creator-save-button:hover,
.project-client-quick-add button:hover {
  background: #28433d;
}

.priority-picker,
.color-picker {
  display: flex;
  padding: 0;
  border: 0;
  margin: 20px 0 0;
  align-items: center;
  gap: 9px;
}

.priority-picker > span,
.color-picker legend {
  margin-right: 5px;
}

.priority-picker label input,
.color-picker label input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.priority-picker label span {
  display: inline-flex;
  height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: #fff;
  font-size: 0.69rem;
  font-weight: 650;
  align-items: center;
}

.priority-picker label input:checked + span {
  border-color: var(--coral);
  color: var(--coral-dark);
  background: var(--coral-pale);
}

.goal-form-title-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 14px;
}

.emoji-field input {
  padding: 0;
  font-size: 1.4rem;
  text-align: center;
}

.swatch {
  display: block;
  width: 28px;
  height: 28px;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.swatch.coral { background: var(--coral); }
.swatch.blue { background: var(--blue); }
.swatch.green { background: var(--green); }
.swatch.yellow { background: var(--yellow); }
.swatch.purple { background: var(--purple); }

.color-picker input:checked + .swatch {
  box-shadow: 0 0 0 2px var(--ink);
  transform: scale(1.1);
}

.modal-actions {
  display: grid;
  margin-top: 28px;
  align-items: center;
  grid-template-columns: auto 1fr auto auto;
  gap: 10px;
}

.ghost-button {
  color: var(--ink-soft);
  background: var(--paper);
  box-shadow: none;
}

.ghost-button:hover {
  color: var(--ink);
  background: var(--paper-deep);
}

.danger-text-button {
  color: #bd5547;
}

.danger-text-button:hover {
  color: #9e382c;
}

.is-hidden {
  display: none !important;
}

.data-description {
  padding: 14px 16px;
  border-radius: 14px;
  margin: -6px 0 18px;
  color: var(--ink-soft);
  background: var(--blue-pale);
  font-size: 0.76rem;
  line-height: 1.7;
}

.data-actions {
  display: grid;
  gap: 10px;
}

.data-action-button {
  display: flex;
  min-height: 70px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--ink);
  background: #fff;
  text-align: left;
  align-items: center;
  gap: 13px;
}

.data-action-button:hover {
  border-color: #b8b4aa;
  background: var(--paper);
}

.data-action-icon {
  display: grid;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--green-pale);
  font-size: 1.1rem;
  place-items: center;
}

.data-action-button > span:last-of-type {
  display: grid;
  gap: 4px;
}

.data-action-button strong,
.data-danger-zone strong {
  font-size: 0.79rem;
}

.data-action-button small,
.data-danger-zone small {
  color: var(--ink-soft);
  font-size: 0.67rem;
}

.data-action-button input {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.data-danger-zone {
  display: flex;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  margin-top: 23px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.organize-modal-card {
  min-height: 520px;
}

.modal-header-copy {
  max-width: 390px;
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 0.65rem;
  line-height: 1.55;
}

.modal-tabs {
  display: grid;
  padding: 5px;
  border-radius: 14px;
  margin: -5px 0 22px;
  background: var(--paper);
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.modal-tabs button {
  min-height: 37px;
  border-radius: 10px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 0.68rem;
  font-weight: 700;
}

.modal-tabs button.is-active {
  color: var(--ink);
  background: var(--white);
  box-shadow: 0 5px 12px rgb(63 55 41 / 7%);
}

.organize-panel {
  display: none;
}

.organize-panel.is-active {
  display: block;
  animation: view-in 180ms ease both;
}

.inline-create-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.inline-create-form input,
.stacked-create-form input,
.stacked-create-form select {
  width: 100%;
  height: 47px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: 0;
  background: #fff;
  font-size: 0.8rem;
}

.inline-create-form button {
  padding: 0 17px;
  border-radius: 13px;
  color: #fff;
  background: var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
}

.stacked-create-form {
  padding: 18px;
  border-radius: 17px;
  background: var(--paper);
}

.stacked-create-form .form-row {
  margin: 0 0 14px;
}

.stacked-create-form > .primary-button {
  width: 100%;
}

.field-label-with-action {
  display: flex;
  min-height: 27px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.field-label-with-action button {
  margin: -5px 0;
}

.project-client-quick-add {
  display: grid;
  padding: 10px;
  border: 1px dashed rgb(112 169 198 / 48%);
  border-radius: 13px;
  margin: -2px 0 14px;
  background: rgb(255 255 255 / 72%);
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.project-client-quick-add input {
  height: 41px;
  border-radius: 10px;
}

.project-client-quick-add button {
  min-height: 41px;
}

.manage-list {
  display: grid;
  max-height: 280px;
  margin-top: 20px;
  gap: 8px;
  overflow-y: auto;
}

.manage-item {
  display: grid;
  min-height: 54px;
  padding: 9px 10px 9px 13px;
  border: 1px solid #e8e3d9;
  border-radius: 13px;
  background: #fff;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.manage-item-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
}

.manage-color {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.manage-item strong {
  display: block;
  overflow: hidden;
  font-size: 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manage-item small {
  display: block;
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 0.61rem;
}

.manage-delete {
  display: grid;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  color: #a69089;
  background: transparent;
  place-items: center;
}

.manage-delete:hover {
  color: #b34f43;
  background: #fff0ed;
}

.manage-delete svg {
  width: 14px;
  height: 14px;
}

.data-danger-zone > div {
  display: grid;
  gap: 4px;
}

.danger-outline-button {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid #db9d93;
  border-radius: 11px;
  color: #b14f42;
  background: transparent;
  font-size: 0.7rem;
  font-weight: 700;
}

.danger-outline-button:hover {
  background: #fff1ee;
}

.toast {
  position: fixed;
  z-index: 200;
  right: 26px;
  bottom: 26px;
  display: flex;
  max-width: min(360px, calc(100vw - 36px));
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 14px;
  color: #fff;
  background: var(--ink);
  box-shadow: 0 16px 36px rgb(24 38 35 / 25%);
  font-size: 0.76rem;
  font-weight: 650;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.praise-pop {
  position: fixed;
  z-index: 205;
  top: 28px;
  left: 50%;
  display: flex;
  min-width: min(390px, calc(100vw - 32px));
  padding: 14px 18px;
  border: 1px solid rgb(255 255 255 / 75%);
  border-radius: 18px;
  color: var(--ink);
  background: rgb(255 254 250 / 94%);
  box-shadow: 0 18px 48px rgb(36 55 51 / 18%);
  backdrop-filter: blur(18px);
  align-items: center;
  gap: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -20px) scale(0.96);
  transition: opacity 200ms ease, transform 280ms cubic-bezier(0.23, 1, 0.32, 1);
}

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

.praise-pop-icon {
  display: grid;
  width: 42px;
  height: 42px;
  border-radius: 14px 16px 13px 17px;
  color: var(--coral-dark);
  background: var(--coral-pale);
  font-size: 1.35rem;
  place-items: center;
  transform: rotate(-5deg);
}

.praise-pop > span:last-child {
  display: grid;
  gap: 3px;
}

.praise-pop strong {
  font-size: 0.84rem;
}

.praise-pop small {
  color: var(--ink-soft);
  font-size: 0.68rem;
}

.confetti-layer {
  position: fixed;
  z-index: 190;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.confetti-piece {
  position: absolute;
  width: 9px;
  height: 14px;
  border-radius: 3px;
  animation: confetti-fall 900ms cubic-bezier(0.24, 0.7, 0.32, 1) forwards;
}

@keyframes confetti-fall {
  0% { opacity: 0; transform: translate(0, 0) rotate(0deg) scale(0.5); }
  10% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(1); }
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .sidebar {
    width: 210px;
    padding-inline: 18px;
  }

  .day-hero {
    padding-inline: 38px;
  }

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

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

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

  .sidebar {
    display: none;
  }

  .main-content {
    padding: 24px 18px 110px;
  }

  .topbar {
    margin-bottom: 25px;
  }

  .mobile-only,
  .mobile-nav {
    display: grid;
  }

  .mobile-only {
    place-items: center;
  }

  .add-button kbd {
    display: none;
  }

  .day-hero {
    grid-template-columns: minmax(0, 1fr) 190px;
    gap: 10px;
  }

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

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

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

  .mascot {
    margin-top: 10px;
  }

  .mobile-nav {
    position: fixed;
    z-index: 50;
    right: 12px;
    bottom: 12px;
    left: 12px;
    height: 72px;
    padding: 7px 9px;
    border: 1px solid rgb(255 255 255 / 70%);
    border-radius: 22px;
    background: rgb(255 254 250 / 92%);
    box-shadow: 0 15px 40px rgb(41 50 46 / 18%);
    backdrop-filter: blur(18px);
    align-items: center;
    grid-template-columns: 1fr 1fr 58px 1fr 1fr;
  }

  .mobile-nav-item {
    display: flex;
    height: 55px;
    border-radius: 14px;
    color: #78837f;
    background: transparent;
    font-size: 0.59rem;
    font-weight: 700;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
  }

  .mobile-nav-item svg {
    width: 20px;
    height: 20px;
  }

  .mobile-nav-item.is-active {
    color: var(--coral-dark);
    background: var(--coral-pale);
  }

  .mobile-add-button {
    display: grid;
    width: 54px;
    height: 54px;
    border-radius: 18px;
    color: #fff;
    background: var(--ink);
    box-shadow: 0 8px 18px rgb(36 55 51 / 25%);
    place-items: center;
    transform: translateY(-11px);
  }

  .mobile-add-button svg {
    width: 23px;
    height: 23px;
  }
}

@media (max-width: 640px) {
  .topbar h1 {
    font-size: 1.08rem;
  }

  .eyebrow {
    font-size: 0.62rem;
  }

  .add-button {
    width: 42px;
    min-height: 42px;
    padding: 0;
  }

  .add-button span {
    display: none;
  }

  .day-hero {
    display: block;
    min-height: 470px;
    padding: 35px 25px 25px;
  }

  .hero-copy h2 {
    font-size: clamp(2rem, 10vw, 2.55rem);
  }

  .hero-copy > p {
    font-size: 0.78rem;
  }

  .quick-add {
    height: 54px;
    margin-top: 22px;
  }

  .progress-orbit {
    width: 155px;
    margin-top: 18px;
  }

  .orbit-face {
    right: 5px;
    bottom: 12px;
    width: 41px;
    height: 32px;
  }

  .today-grid {
    margin-top: 16px;
    gap: 16px;
  }

  .task-card,
  .planned-group,
  .completed-card {
    padding: 24px 19px 18px;
    border-radius: 24px;
  }

  .task-toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .task-toolbar .sort-control {
    margin-left: 0;
    grid-column: 1 / -1;
  }

  .task-item {
    grid-template-columns: 44px minmax(0, 1fr) 40px;
  }

  .task-check {
    width: 44px;
    height: 44px;
  }

  .task-edit-button {
    width: 40px;
    height: 40px;
  }

  .task-edit-button {
    opacity: 1;
  }

  .goals-preview {
    margin-top: 38px;
  }

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

  .page-intro {
    display: block;
    min-height: 0;
    padding: 32px 25px;
  }

  .page-intro h2,
  .compact-intro h2 {
    font-size: 2.25rem;
  }

  .page-intro .secondary-button {
    width: 100%;
    margin-top: 24px;
  }

  .insights-intro {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .insights-intro h2 {
    font-size: 1.44rem;
  }

  .wins-badge {
    width: 105px;
    height: 105px;
  }

  .wins-badge strong {
    font-size: 2.35rem;
  }

  .period-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .period-card {
    min-height: 165px;
    padding: 17px;
  }

  .period-card strong {
    font-size: 2.35rem;
  }

  .insights-heading {
    display: block;
  }

  .insights-heading > p {
    margin-top: 7px;
  }

  .heatmap-card,
  .breakdown-card {
    min-height: 0;
    padding: 24px 19px;
  }

  .heatmap {
    grid-template-columns: repeat(7, minmax(20px, 1fr));
  }

  .compact-intro {
    display: flex;
  }

  .completed-total {
    min-width: 80px;
  }

  .completed-total strong {
    font-size: 2.8rem;
  }

  .modal-card {
    padding: 25px 19px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .classification-card {
    padding: 14px;
  }

  .classification-card-heading {
    align-items: center;
  }

  .inline-new-button {
    min-width: 72px;
    min-height: 44px;
    padding: 0 11px;
  }

  .mini-close-button {
    width: 44px;
    height: 44px;
  }

  .classification-creator-actions {
    grid-template-columns: 1fr;
  }

  .classification-creator-actions > span {
    display: none;
  }

  .text-action-button,
  .creator-save-button {
    width: 100%;
    min-height: 44px;
  }

  .project-client-quick-add {
    grid-template-columns: 1fr;
  }

  .project-client-quick-add button {
    min-height: 44px;
  }

  .modal-actions {
    grid-template-columns: 1fr 1fr;
  }

  .modal-actions > span {
    display: none;
  }

  .modal-actions .danger-text-button {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .modal-actions .ghost-button,
  .modal-actions .primary-button {
    width: 100%;
  }

  .toast {
    right: 18px;
    bottom: 98px;
  }
}

@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;
  }
}
