/* Main app screens — Home, Dashboard, Analytics, Focus Mode, Journal (Figma row 2) */

/* ---------- Element colours ----------
   .el-<name> sets --el / --el-end; components use them for borders and the
   translucent gradient fills (40% for fills, 15% for soft backgrounds). */
.el-water { --el: var(--gradient-water-start); --el-end: var(--gradient-water-end); }
.el-air { --el: var(--gradient-air-start); --el-end: var(--gradient-air-end); }
.el-metal { --el: var(--gradient-metal-start); --el-end: var(--gradient-metal-end); }
.el-earth { --el: var(--gradient-earth-start); --el-end: var(--gradient-earth-end); }
.el-fire { --el: var(--gradient-fire-start); --el-end: var(--gradient-fire-end); }
.el-red { --el: var(--utility-red-light); --el-end: var(--utility-red-light); }

[class*="el-"] {
  --el-gradient: linear-gradient(
    var(--el-angle, 135deg),
    color-mix(in srgb, var(--el) 40%, transparent) 41.827%,
    color-mix(in srgb, var(--el-end) 40%, transparent) 100%
  );
  --el-soft: color-mix(in srgb, var(--el) 15%, transparent);
}

/* ---------- Page ---------- */

/* The theme picture stays put; the page scrolls over it */
.app {
  background-color: #121309;
  background-image: var(--app-bg);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

/* The page scrolls; the background picture scrolls with it */
.app__scroll {
  position: absolute;
  inset: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  background: none;
}

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

/* Above the page (it's only 4% visible) so it stays put while the page scrolls under it */
.app__deco {
  z-index: 1;
}

.app__content {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--gap-medium);
  padding: 70px var(--gap-screen-edge) 150px;
  color: var(--text-white-100);
  font: var(--type-text-s);
}

.app__content--roomy {
  gap: 29px;
}

.app p {
  margin: 0;
}

.app button {
  font: inherit;
  color: inherit;
}

.divider {
  flex-shrink: 0;
  width: 100%;
  height: 1px;
  background: var(--fill-inactive);
}

.app-section {
  display: flex;
  flex-direction: column;
  gap: var(--gap-medium);
}

.app-section--tight {
  gap: var(--gap-base);
}

.section-label {
  font: var(--type-text-xs);
  color: var(--text-white-100);
}

.section-label--dim {
  color: var(--text-white-60);
}

.section-label--center {
  text-align: center;
}

.hint {
  font: var(--type-text-s);
  color: var(--text-white-60);
}

.hint--white {
  color: var(--text-white-100);
}

/* ---------- Header (Analytics_Card_Header) ---------- */

.app-header {
  display: flex;
  align-items: center;
  gap: var(--radius-medium);
}

/* 48px instead of Figma's 60px: the avatar and calendar felt too heavy */
.app-header__avatar {
  flex-shrink: 0;
  padding: 0;
  cursor: pointer;
  background: none;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border: 1px solid var(--stroke-border-active);
  border-radius: var(--radius-medium);
}

.app-header__avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Zoomed in on the cat's face */
  object-position: 56% 46%;
  transform: scale(1.8);
  transform-origin: 56% 46%;
}

/* A photo the user picked in Profile is shown as it is */
.app-header__avatar img.is-own {
  object-position: center;
  transform: none;
}

.app-header__text {
  flex: 1;
  min-width: 0;
  text-align: center;
}

.app-header__title {
  margin: 0;
  font: var(--type-display-medium);
}

/* A little air between the title, the subtitle and the date */
.app-header__subtitle {
  margin-top: 4px !important;
  font: var(--type-text-s);
  color: var(--text-white-60);
}

.app-header__subtitle--bold {
  font-weight: 700;
}

.app-header__date {
  margin-top: 5px !important;
  font: var(--type-text-xs);
  letter-spacing: 0.06em;
  color: var(--text-white-60);
}

.app-header__calendar {
  flex-shrink: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.app-header__calendar img,
.calendar-icon {
  display: block;
  width: 48px;
  height: auto;
}

/* ---------- Week strip (Calendar_Days_Row) ---------- */

.week {
  display: flex;
  flex-direction: column;
  gap: var(--gap-base);
}

.week__days {
  display: flex;
  justify-content: center;
  gap: var(--gap-medium);
}

.week__days--spread {
  justify-content: space-between;
  gap: 0;
}

.week-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 37px;
  padding: var(--gap-small);
  border: 1px solid transparent;
  background: none;
  color: var(--text-white-20) !important;
  cursor: pointer;
  transition: background 400ms var(--ease-soft), color 400ms var(--ease-soft);
}

.week-day__name,
.week-day__dot {
  font: var(--type-text-s);
}

.week-day__date {
  font: var(--type-text-m);
}

.week-day[aria-pressed="true"] {
  border-color: var(--stroke-low);
  background: var(--accent);
  box-shadow: var(--shadow-universal-art);
  color: var(--text-white-100) !important;
}

/* ---------- Cards and pills ---------- */

.card {
  display: flex;
  flex-direction: column;
  gap: var(--gap-base);
  padding: var(--gap-medium);
  border: 1px solid var(--stroke-low);
  background: var(--fill-dark-alpha-50);
  box-shadow: var(--shadow-universal-art);
}

.card__row {
  display: flex;
  justify-content: space-between;
}

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

.card__nav button {
  width: 32px;
  height: 24px;
  padding: 0;
  border: 0;
  background: none;
  font: var(--type-text-xl) !important;
  color: var(--text-white-60) !important;
  cursor: pointer;
}

.card__nav button:hover:not(:disabled) {
  color: var(--text-white-100) !important;
}

.card__nav button:disabled {
  opacity: 0.25;
  cursor: default;
}

.alert {
  padding: var(--gap-base);
  border: 1px solid var(--utility-red-light);
  border-radius: var(--radius-large);
  background: var(--fill-red-alpha-15);
  box-shadow: var(--shadow-universal-art);
  text-align: center;
}

.alert--calm {
  border-color: var(--utility-yellow-full);
  background: var(--fill-yellow-alpha-15);
}

.habit-tile:disabled {
  cursor: default;
  opacity: 0.15;
}

.pill-card {
  --el-angle: 139deg;
  padding: var(--gap-base);
  border: 1px solid var(--el);
  border-radius: var(--radius-large);
  background: var(--el-gradient);
  box-shadow: var(--shadow-universal-art);
  text-align: center;
}

.pill-card--column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap-base);
}

.pill-button,
.el-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--el);
  border-radius: var(--radius-large);
  background: var(--el-gradient);
  box-shadow: var(--shadow-universal-art);
  white-space: nowrap;
}

.pill-button {
  height: 34px;
  padding: var(--gap-base) var(--gap-medium);
  cursor: pointer;
}

.el-badge {
  height: 24px;
  padding: 0 var(--gap-base);
  border-radius: 0;
}

button.el-badge {
  cursor: pointer;
}

.pill-button:hover,
button.el-badge:hover {
  filter: brightness(1.2);
}

/* Status_Tag: tiny coloured label */
.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 35px;
  height: 12px;
  padding: 0 var(--gap-small);
  border: 0.5px solid currentColor;
  font: var(--type-text-xs);
  box-shadow: var(--shadow-universal-art);
}

.tag--badge {
  height: 24px;
  padding: 0 var(--gap-base);
  border-width: 1px;
  font: var(--type-text-s);
}

.tag--red { color: var(--utility-red-light); background: var(--fill-red-alpha-15); }
.tag--yellow { color: var(--utility-yellow-full); background: var(--fill-yellow-alpha-15); }
.tag--earth { color: var(--gradient-earth-start); background: var(--fill-earth-alpha-15); }

/* Element icon in a translucent circle */
.el-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border: 0.5px solid var(--el);
  border-radius: var(--radius-large);
  background: var(--el-gradient);
  box-shadow: var(--shadow-universal-art);
}

.el-icon--small {
  width: 32px;
  height: 32px;
}

.el-icon img {
  display: block;
  max-width: 22px;
  max-height: 22px;
}

/* ---------- Progress bars and element stats ---------- */

.stat-rows {
  display: flex;
  flex-direction: column;
  gap: var(--gap-medium);
}

.stat-row {
  display: flex;
  align-items: center;
  gap: var(--gap-medium);
  height: 23px;
  cursor: pointer;
  border-radius: var(--radius-small);
  transition: background 300ms var(--ease-soft);
}

.stat-row:hover {
  background: var(--neutral-white-alpha-10);
}

/* Cards that open a notification */
[data-notice] {
  cursor: pointer;
  transition: filter 300ms var(--ease-soft);
}

[data-notice]:hover {
  filter: brightness(1.15);
}

.stat-row__name {
  display: flex;
  align-items: center;
  gap: var(--gap-small);
  height: 100%;
}

.stat-row__name img {
  height: 23px;
  width: auto;
  object-fit: cover;
}

.stat-row__name span {
  width: 36px;
  text-align: right;
}

.stat-row__bar,
.progress {
  position: relative;
  flex: 1;
  height: 22px;
}

.stat-row__bar::before,
.progress::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 0;
  right: 0;
  height: 5px;
  border-radius: var(--radius-small);
  background: var(--fill-dark-onyx);
}

.stat-row__fill,
.progress__fill {
  --el-angle: 150deg;
  position: absolute;
  top: 8px;
  left: 0;
  width: var(--value);
  height: 5px;
  border-radius: var(--radius-small);
  background: var(--el-gradient);
  box-shadow: var(--glow-white-neon);
}

/* Any glowing "planet" (bars, radar, charts) shimmers softly, each in its own rhythm */
.planet {
  animation: twinkle 3.2s var(--ease-soft) infinite alternate;
}

.planet:nth-of-type(2n) { animation-duration: 2.6s; animation-delay: -1.1s; }
.planet:nth-of-type(3n) { animation-duration: 3.7s; animation-delay: -2.3s; }

.chart-planet {
  animation: chart-twinkle 2.8s var(--ease-soft) infinite alternate;
  filter: drop-shadow(0 0 3px #947ce3);
}

.chart-planet:nth-of-type(2n) { animation-duration: 3.4s; animation-delay: -1.4s; }

@keyframes chart-twinkle {
  from { opacity: 0.6; filter: drop-shadow(0 0 1px #947ce3); }
  to { opacity: 1; filter: drop-shadow(0 0 5px #b9a6ff); }
}

/* The glowing "planet" at the end of a bar */
.stat-row__dot,
.progress__dot {
  position: absolute;
  top: 6px;
  left: calc(var(--value) - 5px);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--el) 75%, white 10%);
  box-shadow:
    0 0 6px 3px color-mix(in srgb, var(--el) 55%, transparent),
    0 0 16px 6px color-mix(in srgb, var(--el) 25%, transparent);
  animation: twinkle 3.2s var(--ease-soft) infinite alternate;
}

/* Each planet in its own rhythm, so they never pulse together */
.stat-row:nth-child(2) .stat-row__dot { animation-duration: 2.6s; animation-delay: -1.1s; }
.stat-row:nth-child(3) .stat-row__dot { animation-duration: 3.7s; animation-delay: -2.3s; }
.stat-row:nth-child(4) .stat-row__dot { animation-duration: 2.9s; animation-delay: -0.6s; }
.stat-row:nth-child(5) .stat-row__dot { animation-duration: 3.4s; animation-delay: -1.8s; }
.progress__dot { animation-duration: 2.8s; animation-delay: -0.9s; }

@keyframes twinkle {
  0% {
    opacity: 0.75;
    box-shadow:
      0 0 4px 2px color-mix(in srgb, var(--el) 45%, transparent),
      0 0 10px 3px color-mix(in srgb, var(--el) 15%, transparent);
  }
  100% {
    opacity: 1;
    box-shadow:
      0 0 8px 4px color-mix(in srgb, var(--el) 70%, transparent),
      0 0 22px 9px color-mix(in srgb, var(--el) 35%, transparent);
  }
}

@media (prefers-reduced-motion: reduce) {
  .stat-row__dot,
  .progress__dot,
  .planet,
  .chart-planet {
    animation: none;
  }
}

.stat-row__values {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-small);
  width: 64px;
}

.stat-row__value {
  color: var(--el);
}

/* Today's focus: one bar mixing Air and Fire */
.progress--mixed {
  --el: var(--gradient-earth-start);
}

.progress--mixed .progress__fill {
  background: linear-gradient(171deg, rgba(77, 56, 204, 0.8) 0%, rgba(238, 118, 42, 0.8) 91.827%);
}

.focus-card__text span {
  color: var(--text-white-60);
}

.focus-card__progress {
  display: flex;
  align-items: center;
  gap: 13px;
}

.focus-card__go {
  align-self: flex-start;
  height: 30px;
  margin-top: 2px;
}

.focus-card__value {
  width: 31px;
  text-align: right;
  color: var(--gradient-fire-start);
}

/* ---------- Home ---------- */

.home-rings {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-header-top-margin);
}

/* The picture has 15px of room around the outer ring, so planets aren't cut off;
   the negative margin keeps the rings where they were in Figma */
.home-rings__note {
  margin-top: -6px !important;
  text-align: center;
}

.home-rings img {
  display: block;
  margin: -15px 0;
}

.habit-tiles {
  display: flex;
  justify-content: space-between;
  gap: var(--gap-base);
}

.habit-tile {
  --el-angle: 95deg;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap-small);
  padding: var(--gap-base) var(--gap-small);
  border: 1px solid var(--el);
  background: var(--el-gradient);
  box-shadow: var(--shadow-universal-art);
  cursor: pointer;
  opacity: 0.3;
  transition: opacity 500ms var(--ease-soft);
}

.habit-tile:hover {
  opacity: 0.6;
}

.habit-tile[aria-pressed="true"] {
  opacity: 1;
}

.habit-tile__name {
  width: 47px;
  font: var(--type-text-xs);
  text-align: center;
}

/* ---------- Dashboard ---------- */

.sync-pill {
  align-self: flex-start;
  width: 142px;
  padding: var(--gap-base) var(--gap-medium);
  border: 1px solid var(--gradient-earth-start);
  border-radius: var(--radius-large);
  background: var(--accent);
  box-shadow: var(--shadow-universal-art);
  text-align: center;
  white-space: pre;
}

.task-group,
.task-group__list {
  display: flex;
  flex-direction: column;
  gap: var(--gap-base);
}

.status-pill {
  align-self: flex-start;
  height: 24px;
  padding: var(--gap-small) var(--gap-base);
  border: 1px solid currentColor;
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-universal-art);
}

.status-pill--overdue { color: var(--utility-red-light); background: var(--fill-red-alpha-15); }
.status-pill--today { color: var(--gradient-earth-start); background: var(--fill-earth-alpha-15); }
.status-pill--upcoming { color: var(--gradient-metal-start); border-color: var(--gradient-air-start); background: var(--fill-air-alpha-15); }

.task {
  cursor: default;
  display: flex;
  align-items: center;
  gap: var(--gap-base);
  width: 100%;
  height: 55px;
  padding: var(--gap-medium);
  border: 1px solid var(--el);
  background: var(--el-gradient);
  box-shadow: var(--shadow-universal-art);
  text-align: left;
  cursor: pointer;
  transition: opacity 500ms var(--ease-soft);
}

.task.el-red,
.task.el-red .el-icon {
  background: var(--fill-red-alpha-15);
}

.task__text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--gap-micro);
  align-self: stretch;
  justify-content: center;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}

.task__check {
  padding: 0;
  cursor: pointer;
  transition: transform 300ms var(--ease-soft), box-shadow 300ms var(--ease-soft);
}

.task__check:hover {
  transform: scale(1.1);
  box-shadow: var(--glow-white-neon);
}

.task-delete {
  color: var(--utility-red-light) !important;
}

.task__time {
  color: var(--text-white-60);
}

.task[aria-pressed="true"] {
  opacity: 0.35;
}

/* A tapped task fades and slides before it moves to its new group */
.task--leaving {
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 350ms var(--ease-soft), transform 350ms var(--ease-soft);
}

.task-groups {
  display: flex;
  flex-direction: column;
  gap: var(--gap-medium);
}

.status-pill--done { color: var(--text-white-60); border-color: var(--neutral-white-alpha-20); background: rgba(5, 6, 17, 0.25); }

/* New reminder form */
.add-form {
  gap: var(--gap-medium);
  border-radius: var(--radius-medium);
}

.add-form__title {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid var(--stroke-low);
  border-radius: var(--radius-large);
  background: rgba(5, 6, 17, 0.3);
  color: var(--text-white-100);
  font: var(--type-text-m);
  outline: none;
}

.add-form__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-base);
}

.chip.chip--element {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
}

.chip.chip--element img {
  display: block;
  margin: auto;
}

/* Text-only actions in windows: just coloured words */
.text-action {
  padding: 6px 4px;
  border: 0;
  background: none;
  font: var(--type-text-m) !important;
  transition: opacity 200ms, text-shadow 200ms;
}

.text-action:hover {
  text-shadow: 0 0 10px currentColor;
}

.text-action--red { color: #ff6b6b !important; }
.text-action--green { color: var(--gradient-earth-start) !important; }
.text-action--purple { color: #b9a6ff !important; }

.chip--element img {
  max-width: 14px;
  max-height: 16px;
}

.add-task {
  --el-angle: 118deg;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: var(--gap-base);
  padding: var(--gap-base) var(--gap-medium);
  border: 1px solid var(--el);
  border-radius: var(--radius-large);
  background: var(--el-gradient);
  box-shadow: var(--shadow-universal-art);
  cursor: pointer;
}

.add-task:hover {
  filter: brightness(1.2);
}

/* ---------- Focus Mode ---------- */

.focus-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-base);
}

.focus-mode {
  display: flex;
  flex-direction: column;
  gap: var(--gap-base);
  height: 248px;
}

.focus-mode__card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap-base);
  padding: var(--gap-medium);
  border: 1px solid var(--stroke-low);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  box-shadow: var(--shadow-universal-art);
  text-align: left;
  cursor: pointer;
  transition: transform 500ms var(--ease-soft), border-color 500ms var(--ease-soft);
}

.focus-mode__card:hover {
  transform: scale(1.02);
  border-color: var(--stroke-border-active);
}

.focus-mode__card,
.focus-mode__card:active {
  color: var(--text-white-100);
}

.focus-mode__card:active {
  transform: scale(1.05);
  transition-duration: 150ms;
}

.focus-mode__title {
  font: var(--type-display-small);
  text-align: center;
}

.focus-mode__text {
  width: 100%;
  font: var(--type-text-s);
}

/* ---------- Analytics ---------- */

.period-tabs {
  display: flex;
  height: 26px;
  background: var(--fill-dark-alpha-50);
}

.period-tabs__item {
  flex: 1;
  border: 1px solid transparent;
  background: none;
  color: var(--text-white-20) !important;
  font: var(--type-text-m) !important;
  cursor: pointer;
  transition: background 400ms var(--ease-soft), color 400ms var(--ease-soft);
}

.period-tabs__item[aria-pressed="true"] {
  border-color: var(--stroke-low);
  background: var(--accent);
  color: var(--text-white-100) !important;
}

.radar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap-base);
}

.radar__chart {
  position: relative;
  width: 309px;
  height: 307px;
}

.radar__chart img {
  position: absolute;
  display: block;
}

.radar__mandala {
  left: 6.5px;
  top: 11px;
  width: 294px;
  height: 294px;
  opacity: 0.2;
  transform: rotate(-90deg);
}

.radar__axis { position: absolute; display: block; left: 6px; top: 4px; overflow: visible; }

.radar__shape {
  position: absolute;
  inset: 0;
  overflow: visible;
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.25));
}

.radar__morph {
  animation: fade-in 700ms var(--ease-soft) both;
}

/* Planets on the corners of the radar */
.radar__planet {
  position: absolute;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--el) 75%, white 10%);
  box-shadow: 0 0 6px 3px color-mix(in srgb, var(--el) 55%, transparent);
  transition: left 600ms var(--ease-soft), top 600ms var(--ease-soft);
}

.radar__center {
  position: absolute;
  left: 153px;
  top: 158px;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 0 0 11px rgba(238, 118, 42, 0.4), 0 4px 8px rgba(0, 0, 0, 0.25);
}

.advisory {
  gap: var(--gap-medium);
}

.advisory .el-badge {
  align-self: flex-start;
}

.energy {
  align-items: stretch;
}

.energy__days {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: var(--gap-medium);
  height: 138px;
}

.energy__days--year {
  gap: 4px;
}

.energy__days--year .energy-day__label {
  font: var(--type-text-xxs);
}

.energy-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap-small);
  flex: 1;
  max-width: 31px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-white-60) !important;
  cursor: pointer;
}

.energy-day__date,
.energy-day__dot {
  visibility: hidden;
}

.energy-day__bar {
  width: 100%;
  transition: height 600ms var(--ease-soft);
  height: var(--h);
  border: 0.5px solid var(--gradient-air-start);
  background: var(--fill-air-alpha-15);
  transition: background 400ms var(--ease-soft);
}

.energy-day__dot {
  width: 3px;
  height: 3px;
  margin-top: -2px;
  border-radius: 50%;
  background: var(--gradient-air-start);
}

/* Days that haven't come yet: an empty outline, no check, not tappable */
.energy-day.is-future,
.habit-day.is-future {
  cursor: default;
}

.energy-day.is-future .energy-day__bar {
  border: 0;
  border-bottom: 1px dashed var(--gradient-air-start);
  background: none;
  opacity: 0.5;
}

.habit-day.is-future .el-icon {
  border-style: dashed;
  background: none;
  box-shadow: none;
}

.energy-day[aria-pressed="true"] {
  color: var(--text-white-100) !important;
}

.energy-day[aria-pressed="true"] .energy-day__date,
.energy-day[aria-pressed="true"] .energy-day__dot {
  visibility: visible;
}

.energy-day[aria-pressed="true"] .energy-day__bar {
  background: linear-gradient(160deg, rgba(148, 124, 227, 0.4) 41.827%, rgba(77, 56, 204, 0.4) 100%);
}

.sessions {
  align-items: center;
}

.sessions__badges {
  display: flex;
  gap: 50px;
}

.sessions__chart {
  display: block;
  max-width: 100%;
  height: auto;
}

.sessions__days {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding-left: 18px;
  font: var(--type-text-xxs);
}

.sessions__legend {
  display: flex;
  gap: var(--gap-base);
}

.legend {
  display: inline-flex;
  align-items: center;
  gap: var(--gap-small);
}

.legend::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--legend);
}

.legend--air { --legend: var(--gradient-air-start); }
.legend--water { --legend: var(--gradient-water-start); }

.stat-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-base);
  margin: 0 -2px;
}

.stat-card {
  justify-content: space-between;
  height: 93px;
}

.stat-card__top {
  display: flex;
  justify-content: space-between;
  gap: var(--gap-base);
}

.stat-card__metric {
  display: flex;
  flex-direction: column;
  gap: var(--gap-small);
}

.stat-card__value {
  display: inline-flex;
  align-items: center;
  gap: var(--gap-small);
  white-space: nowrap;
}

.stat-card__value img {
  width: 9px;
  height: 9px;
}

.stat-card__label {
  color: var(--text-white-60);
}

.stat-card__chart {
  display: block;
}

.habit-cards {
  display: flex;
  flex-direction: column;
  gap: var(--gap-base);
  margin: 0 -2px;
}

.habit-card {
  display: flex;
  flex-direction: column;
  gap: var(--gap-base);
  padding: var(--gap-medium);
  border: 1px solid var(--el);
  background: var(--el-gradient);
  box-shadow: var(--shadow-universal-art);
}

.habit-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--gap-base);
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}

/* Opened habit: instructions and settings */
.habit-card__details {
  display: flex;
  flex-direction: column;
  gap: var(--gap-medium);
  padding-top: var(--gap-small);
  line-height: 1.4;
  animation: rise-in 450ms var(--ease-soft) both;
}

.habit-card__block {
  display: flex;
  flex-direction: column;
  gap: var(--gap-small);
}

.habit-card__row {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.habit-card__steps {
  margin: 0;
  padding-left: 18px;
}

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

.chips--days {
  flex-wrap: nowrap;
  gap: 4px;
}

.chip {
  padding: 6px 10px;
  border: 1px solid var(--neutral-white-alpha-20);
  border-radius: var(--radius-large);
  background: rgba(5, 6, 17, 0.25);
  cursor: pointer;
  transition: background 300ms var(--ease-soft), border-color 300ms var(--ease-soft);
}

.chip--day {
  flex: 1;
  min-width: 0;
  padding: 6px 0;
}

.chip[aria-pressed="true"] {
  border-color: var(--stroke-border-active);
  background: color-mix(in srgb, var(--el, white) 45%, transparent);
  box-shadow: var(--glow-white-neon);
}

.time-field {
  padding: 6px 12px;
  border: 1px solid var(--neutral-white-alpha-20);
  border-radius: var(--radius-large);
  background: rgba(5, 6, 17, 0.25);
  color: var(--text-white-100);
  font: var(--type-text-m);
  color-scheme: dark;
}

.habit-card__title {
  display: flex;
  align-items: center;
  gap: var(--gap-base);
}

.habit-card__days {
  display: flex;
  justify-content: space-between;
}

.habit-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap-small);
  width: 32px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  opacity: 0.3;
  transition: opacity 400ms var(--ease-soft);
}

.habit-day[aria-pressed="true"] {
  opacity: 1;
}

/* ---------- Journal ---------- */

.mood--yellow { --m: var(--utility-yellow-full); }
.mood--water { --m: var(--gradient-water-start); }
.mood--red { --m: var(--utility-red-light); }
.mood--air { --m: var(--gradient-air-start); }
.mood--earth { --m: var(--gradient-earth-start); }

.journal-prompt {
  font: var(--type-display-small);
}

.gratitude {
  --el-angle: 150deg;
  width: 100%;
  min-height: 190px;
  padding: var(--gap-medium) var(--spacing-header-top-margin);
  border: 1px solid var(--el);
  border-radius: var(--radius-large);
  background: var(--el-gradient);
  box-shadow: var(--shadow-universal-art);
  color: var(--text-white-100);
  font: var(--type-display-small);
  resize: none;
  outline: none;
}

.gratitude:focus-visible {
  border-color: var(--stroke-border-active);
}

.moods {
  display: flex;
  justify-content: space-between;
}

.mood-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--gap-small);
  width: 65px;
  height: 24px;
  padding: var(--gap-small);
  border: 1px solid var(--m);
  background: color-mix(in srgb, var(--m) 15%, transparent);
  box-shadow: var(--shadow-universal-art);
  cursor: pointer;
  transition: background 400ms var(--ease-soft), transform 400ms var(--ease-soft), box-shadow 400ms var(--ease-soft);
}

.mood-tag[aria-checked="true"] {
  background: color-mix(in srgb, var(--m) 40%, transparent);
  box-shadow: var(--shadow-universal-art), 0 0 12px color-mix(in srgb, var(--m) 50%, transparent);
  transform: scale(1.06);
}

.entries {
  display: flex;
  flex-direction: column;
  gap: var(--gap-base);
}

.entry {
  gap: var(--gap-small);
}

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

.entry__text {
  color: var(--text-white-60);
}

.mood-month {
  align-items: stretch;
}

.mood-month__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  row-gap: var(--gap-base);
  justify-items: center;
}

.mood-month__weekday {
  font: var(--type-text-xs);
}

.journal-save {
  height: 44px;
  margin-top: var(--gap-small);
  border: 1px solid var(--stroke-border-active);
  background: linear-gradient(to right, var(--gradient-blue-start), var(--gradient-blue-end) 52%);
  font: var(--type-text-l) !important;
  cursor: pointer;
  transition: opacity 300ms var(--ease-soft), filter 300ms var(--ease-soft);
}

.journal-save:hover:not(:disabled) {
  filter: brightness(1.25);
}

.journal-save:disabled {
  opacity: 0.4;
  cursor: default;
}

.mood-day {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap-micro);
}

.mood-day__circle {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0.5px solid var(--fill-inactive);
  border-radius: 50%;
  background: var(--fill-dark-alpha-50);
  box-shadow: var(--shadow-universal-art);
}

.mood-day__circle[class*="mood--"] {
  border-color: color-mix(in srgb, var(--m) 50%, transparent);
  background: color-mix(in srgb, var(--m) 15%, transparent);
}

.mood-day__number {
  font: var(--type-text-xs);
  color: var(--text-white-60);
}

.mood-day--today .mood-day__number {
  color: var(--text-white-100);
}

.year {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 -2px;
  font: var(--type-text-xxs);
  color: var(--text-white-60);
}

.year__months {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  padding-left: 20px;
}

.year__body {
  display: flex;
  gap: var(--gap-small);
}

.year__weekdays {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 15px;
}

.year__dots {
  flex: 1;
  display: grid;
  grid-template-rows: repeat(7, 5px);
  grid-template-columns: repeat(53, 5px);
  justify-content: space-between;
  row-gap: 4px;
}

.year-dot {
  width: 5px;
  height: 5px;
  border: 0.5px solid var(--fill-inactive);
  border-radius: 50%;
  background: var(--fill-dark-alpha-50);
}

.year__months .is-current {
  color: var(--text-white-100);
}

.year-dot.is-current {
  border-color: var(--neutral-white-alpha-60);
}

.year-dot[class*="mood--"] {
  border-color: var(--m);
  background: var(--m);
}

/* ---------- Tab bar (Tab_Bar_Component) ---------- */

/* Soft blur and darkening at the bottom, so the tab bar stands out from the page */
.app__fade {
  position: absolute;
  z-index: 4;
  left: 0;
  right: 0;
  bottom: 0;
  height: 190px;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--tab-fade, rgba(10, 11, 6, 0.75)) 70%);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 55%);
  mask-image: linear-gradient(to bottom, transparent, #000 55%);
}

.tab-bar {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--gap-screen-edge);
  width: 342px;
  padding: var(--gap-medium);
  transform: translateX(-50%);
  border-radius: var(--radius-large);
  border: 1px solid var(--tab-line, transparent);
  background: var(--tab-bar, var(--accent));
  box-shadow: var(--shadow-universal-art);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.tab-bar__item {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  background: none;
  color: var(--text-white-20) !important;
  cursor: pointer;
  transition: color 400ms var(--ease-soft), background 400ms var(--ease-soft);
}

.tab-bar__item:hover {
  color: var(--text-white-60) !important;
}

.tab-bar__item[aria-current="page"] {
  border-color: var(--stroke-low);
  background: var(--accent);
  box-shadow: var(--shadow-universal-art);
  color: var(--text-white-100) !important;
}

.tab-bar__item svg {
  display: block;
}

.mood-day:disabled {
  cursor: default;
}

/* Journal smart insight */
.insight {
  display: flex;
  gap: var(--gap-base);
  padding: var(--gap-medium);
  border: 1px solid var(--tone);
  background: color-mix(in srgb, var(--tone) 14%, rgba(5, 6, 17, 0.4));
  line-height: 1.4;
}

.insight b {
  font-weight: 400;
  font: var(--type-text-m);
}

.insight--yellow { --tone: var(--utility-yellow-full); }
.insight--green { --tone: var(--gradient-earth-start); }

.insight__icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--tone);
  border-radius: 50%;
  font-size: 11px;
}

.insight__text {
  flex: 1;
}

.insight__close {
  flex-shrink: 0;
  align-self: flex-start;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid var(--neutral-white-alpha-20);
  border-radius: 50%;
  background: none;
  color: var(--text-white-60) !important;
  cursor: pointer;
}

.insight__close:hover {
  color: var(--text-white-100) !important;
  border-color: var(--stroke-border-active);
}
