:root {
  --paper: #f7f3ea;
  --paper-deep: #eee7d9;
  --ink: #20342f;
  --muted: #718078;
  --forest: #315f4d;
  --forest-dark: #24483b;
  --mint: #dce9dc;
  --apricot: #f2c99d;
  --yellow: #f3d879;
  --white: rgba(255, 255, 255, 0.86);
  --line: rgba(49, 95, 77, 0.12);
  --shadow: 0 18px 45px rgba(42, 73, 60, 0.11);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, rgba(243, 216, 121, 0.25), transparent 32rem),
    radial-gradient(circle at 92% 24%, rgba(198, 224, 204, 0.45), transparent 28rem),
    var(--paper);
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

button,
.activity-card {
  -webkit-tap-highlight-color: transparent;
}

.ambient {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(10px);
  opacity: 0.55;
  pointer-events: none;
}

.ambient-one {
  width: 170px;
  height: 170px;
  top: -80px;
  right: -50px;
  background: rgba(243, 216, 121, 0.45);
}

.ambient-two {
  width: 220px;
  height: 220px;
  top: 440px;
  left: -140px;
  background: rgba(170, 204, 180, 0.4);
}

.app-shell {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: max(22px, env(safe-area-inset-top)) 18px max(36px, env(safe-area-inset-bottom));
}

.hero {
  padding: 14px 4px 8px;
}

.hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow,
.section-label,
.progress-kicker {
  margin: 0 0 7px;
  color: var(--forest);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 430px;
  margin-bottom: 10px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2.45rem, 10vw, 4.6rem);
  line-height: 0.96;
  letter-spacing: -0.045em;
}

.hero-copy {
  max-width: 460px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.sun-mark {
  position: relative;
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow:
    0 -18px 0 -15px var(--yellow),
    0 18px 0 -15px var(--yellow),
    18px 0 0 -15px var(--yellow),
    -18px 0 0 -15px var(--yellow),
    13px 13px 0 -15px var(--yellow),
    -13px -13px 0 -15px var(--yellow),
    -13px 13px 0 -15px var(--yellow),
    13px -13px 0 -15px var(--yellow);
}

.sun-mark span {
  position: absolute;
  inset: 13px;
  border: 2px solid rgba(111, 84, 31, 0.18);
  border-radius: 50%;
}

.progress-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 17px;
  margin-top: 25px;
  padding: 19px;
  color: #f9f8f1;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.05), transparent 40%),
    var(--forest);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.progress-card::after {
  content: "";
  position: absolute;
  width: 130px;
  height: 130px;
  top: -70px;
  right: -45px;
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 50%;
  box-shadow: 0 0 0 23px rgba(255,255,255,0.035), 0 0 0 48px rgba(255,255,255,0.025);
}

.progress-ring {
  --progress: 0deg;
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: conic-gradient(var(--yellow) var(--progress), rgba(255,255,255,0.13) 0);
  transition: background 400ms ease;
}

.progress-ring-inner {
  display: grid;
  place-content: center;
  width: 67px;
  height: 67px;
  text-align: center;
  background: var(--forest-dark);
  border-radius: 50%;
}

.progress-ring strong {
  font-size: 1.05rem;
  line-height: 1;
}

.progress-ring span {
  margin-top: 3px;
  color: rgba(255,255,255,0.62);
  font-size: 0.65rem;
}

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

.progress-kicker {
  color: #b9d5c6;
}

.progress-copy h2 {
  margin-bottom: 5px;
  font-size: 1.16rem;
}

.progress-copy > p:last-child {
  margin-bottom: 0;
  color: rgba(255,255,255,0.68);
  font-size: 0.79rem;
  line-height: 1.45;
}

.inspiration-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 13px;
  margin: 18px 0;
  padding: 17px;
  background: linear-gradient(135deg, rgba(242, 201, 157, 0.52), rgba(255,255,255,0.73));
  border: 1px solid rgba(160, 109, 57, 0.11);
  border-radius: var(--radius-lg);
}

.inspiration-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #79552d;
  background: rgba(255,255,255,0.58);
  border-radius: 14px;
  font-size: 1.1rem;
}

.inspiration-card .section-label {
  margin-bottom: 4px;
  color: #8b6135;
}

.inspiration-card h2 {
  margin-bottom: 3px;
  font-size: 0.98rem;
  line-height: 1.3;
}

.inspiration-card p:last-child {
  margin-bottom: 0;
  color: #7c6a58;
  font-size: 0.75rem;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  padding: 0;
  cursor: pointer;
  background: rgba(255,255,255,0.72);
  border: 0;
  border-radius: 50%;
  transition: transform 160ms ease, background 160ms ease;
}

.icon-button:active {
  transform: scale(0.92) rotate(12deg);
}

.icon-button svg {
  width: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.controls {
  margin-top: 21px;
}

.search-box {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background: rgba(255,255,255,0.78);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 7px 22px rgba(55, 76, 64, 0.055);
}

.search-box:focus-within {
  border-color: rgba(49, 95, 77, 0.38);
  box-shadow: 0 0 0 4px rgba(49, 95, 77, 0.07);
}

.search-box svg {
  width: 19px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.8;
  stroke-linecap: round;
}

.search-box input {
  width: 100%;
  height: 51px;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 0.91rem;
}

.search-box input::placeholder {
  color: #95a098;
}

.search-box button {
  display: none;
  width: 28px;
  height: 28px;
  padding: 0;
  cursor: pointer;
  color: var(--muted);
  background: var(--paper-deep);
  border: 0;
  border-radius: 50%;
  font-size: 1.2rem;
  line-height: 1;
}

.search-box.has-value button {
  display: grid;
  place-items: center;
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 11px;
  margin-top: 12px;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  flex: 1;
  padding: 4px;
  background: rgba(226, 224, 213, 0.68);
  border-radius: 14px;
}

.segmented button {
  min-height: 35px;
  padding: 6px 9px;
  cursor: pointer;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 700;
}

.segmented button.active {
  color: var(--forest-dark);
  background: rgba(255,255,255,0.88);
  box-shadow: 0 4px 12px rgba(54, 72, 62, 0.08);
}

.add-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 43px;
  padding: 0 14px;
  cursor: pointer;
  color: white;
  background: var(--forest);
  border: 0;
  border-radius: 14px;
  font-size: 0.78rem;
  font-weight: 800;
}

.add-button span {
  font-size: 1.2rem;
  font-weight: 400;
}

.category-scroller {
  display: flex;
  gap: 8px;
  margin: 13px -18px 0;
  padding: 0 18px 5px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

.category-scroller::-webkit-scrollbar {
  display: none;
}

.category-filter {
  flex: 0 0 auto;
  min-height: 37px;
  padding: 0 13px;
  cursor: pointer;
  color: var(--muted);
  background: rgba(255,255,255,0.48);
  border: 1px solid var(--line);
  border-radius: 999px;
  scroll-snap-align: start;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.category-filter.active {
  color: white;
  background: var(--forest);
  border-color: var(--forest);
}

.list-section {
  margin-top: 23px;
}

.list-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 13px;
}

.list-heading h2 {
  margin-bottom: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.65rem;
  letter-spacing: -0.025em;
}

.result-count {
  padding-bottom: 3px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.activity-list {
  display: grid;
  gap: 10px;
}

.activity-card {
  --category-color: #dfe9df;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 13px;
  min-height: 82px;
  padding: 13px 13px 13px 15px;
  background: rgba(255,255,255,0.76);
  border: 1px solid rgba(52, 81, 67, 0.09);
  border-radius: 19px;
  box-shadow: 0 8px 23px rgba(48, 68, 58, 0.045);
  transition: transform 180ms ease, opacity 180ms ease, background 180ms ease;
  animation: cardIn 320ms ease both;
}

.activity-card:active {
  transform: scale(0.985);
}

.activity-card.completed {
  background: rgba(236, 239, 231, 0.7);
  opacity: 0.72;
}

.activity-card.completed .activity-title {
  color: #758078;
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

.check-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  padding: 0;
  cursor: pointer;
  color: transparent;
  background: transparent;
  border: 1.7px solid #b3beb6;
  border-radius: 10px;
  transition: all 180ms ease;
}

.check-button svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.completed .check-button {
  color: white;
  background: var(--forest);
  border-color: var(--forest);
}

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

.activity-topline {
  display: flex;
  align-items: center;
  gap: 7px;
}

.activity-title {
  margin-bottom: 5px;
  font-size: 0.91rem;
  font-weight: 700;
  line-height: 1.32;
  transition: color 180ms ease;
}

.new-badge {
  flex: 0 0 auto;
  padding: 3px 6px;
  color: #8b5f2c;
  background: #f8e3c7;
  border-radius: 999px;
  font-size: 0.55rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.activity-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 9px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.meta-item svg {
  width: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.category-dot {
  width: 8px;
  height: 8px;
  background: var(--category-color);
  border-radius: 50%;
}

.card-menu {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  cursor: pointer;
  color: #95a098;
  background: transparent;
  border: 0;
  border-radius: 50%;
}

.card-menu:hover {
  background: var(--paper);
}

.card-menu svg {
  width: 18px;
  fill: currentColor;
}

.empty-state {
  padding: 50px 22px;
  text-align: center;
  background: rgba(255,255,255,0.52);
  border: 1px dashed rgba(49, 95, 77, 0.2);
  border-radius: var(--radius-lg);
}

.empty-illustration {
  margin-bottom: 12px;
  font-size: 2.2rem;
}

.empty-state h3 {
  margin-bottom: 6px;
}

.empty-state p {
  margin-bottom: 17px;
  color: var(--muted);
  font-size: 0.85rem;
}

.empty-state button,
footer button {
  cursor: pointer;
  color: var(--forest);
  background: transparent;
  border: 0;
  font-weight: 800;
}

footer {
  padding: 30px 10px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 0.75rem;
}

footer p {
  margin-bottom: 9px;
}

footer button {
  font-size: 0.71rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

dialog {
  width: min(calc(100% - 24px), 520px);
  margin: auto auto 0;
  padding: 0;
  color: var(--ink);
  background: var(--paper);
  border: 0;
  border-radius: 25px 25px 0 0;
  box-shadow: 0 -20px 70px rgba(19, 37, 30, 0.2);
}

dialog::backdrop {
  background: rgba(27, 45, 38, 0.47);
  backdrop-filter: blur(3px);
}

dialog[open] {
  animation: dialogUp 260ms ease both;
}

dialog form {
  display: grid;
  gap: 16px;
  padding: 10px 20px calc(24px + env(safe-area-inset-bottom));
}

.dialog-handle {
  width: 44px;
  height: 5px;
  margin: 0 auto 2px;
  background: #d2d1c9;
  border-radius: 99px;
}

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

.dialog-heading h2 {
  margin-bottom: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.7rem;
}

.dialog-close {
  width: 37px;
  height: 37px;
  cursor: pointer;
  color: var(--muted);
  background: rgba(255,255,255,0.68);
  border: 0;
  border-radius: 50%;
  font-size: 1.5rem;
}

dialog label {
  display: grid;
  gap: 7px;
  font-size: 0.78rem;
  font-weight: 800;
}

dialog label span {
  color: var(--muted);
  font-weight: 500;
}

dialog input,
dialog select {
  width: 100%;
  height: 49px;
  padding: 0 13px;
  color: var(--ink);
  background: rgba(255,255,255,0.78);
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: 0;
}

dialog input:focus,
dialog select:focus {
  border-color: rgba(49, 95, 77, 0.45);
  box-shadow: 0 0 0 4px rgba(49, 95, 77, 0.08);
}

.primary-button {
  min-height: 51px;
  margin-top: 2px;
  cursor: pointer;
  color: white;
  background: var(--forest);
  border: 0;
  border-radius: 14px;
  font-weight: 800;
}

.toast {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  max-width: calc(100% - 32px);
  padding: 12px 17px;
  color: white;
  background: var(--forest-dark);
  border-radius: 999px;
  box-shadow: 0 12px 35px rgba(22, 42, 34, 0.24);
  font-size: 0.79rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 18px);
  transition: opacity 180ms ease, transform 180ms ease;
}

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

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

.confetti {
  position: absolute;
  top: -12px;
  width: 8px;
  height: 13px;
  border-radius: 2px;
  animation: confettiFall var(--duration) linear forwards;
  transform: rotate(var(--rotation));
}

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

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

@keyframes confettiFall {
  to {
    transform: translate(var(--drift), 105vh) rotate(720deg);
    opacity: 0.9;
  }
}

@media (min-width: 680px) {
  .app-shell {
    padding-left: 26px;
    padding-right: 26px;
  }

  .hero {
    padding-top: 28px;
  }

  .progress-card {
    padding: 22px 25px;
  }

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

  .activity-card {
    align-content: center;
    min-height: 100px;
  }

  .category-scroller {
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
  }

  dialog {
    margin: auto;
    border-radius: 25px;
  }
}

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