/*
    День Камрона.

    Правила:
    1. Приложение не предлагает и не спрашивает — оно говорит, что делать сейчас.
    2. Сверху — сколько уже сделано, а не сколько осталось.
    3. Время нельзя обмануть: дело отмечается только пока идёт. Прошло — упущено.
    4. Питомец живёт сам: дышит, моргает, смотрит по сторонам, говорит ртом.
       Его настроение — единственное давление в приложении.
  */

:root {
  --ink: #151813;
  --ink-soft: #5c6356;
  --ink-faint: #8d9487;
  --lime: #d6f24b;
  --lime-deep: #aacf24;
  --warm: #ff9b7a;

  --glass: rgba(255, 255, 255, 0.52);
  --glass-strong: rgba(255, 255, 255, 0.74);
  --glass-edge: rgba(255, 255, 255, 0.72);
  --glass-lip: inset 0 1px 0 rgba(255, 255, 255, 0.92), inset 0 -1px 0 rgba(255, 255, 255, 0.3);
  --glass-drop: 0 10px 30px rgba(44, 58, 22, 0.13);
  --blur: blur(22px) saturate(175%);

  --r: 26px;
  --gut: max(16px, env(safe-area-inset-left));
  --emoji: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', 'Twemoji Mozilla', sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family:
    Manrope,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  color: var(--ink);
  background: #eef1e6;
  min-height: 100vh;
  padding-bottom: calc(104px + env(safe-area-inset-bottom));
  overflow-x: hidden;
}

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(68% 52% at 14% 4%, #eafc8d 0%, transparent 62%),
    radial-gradient(58% 46% at 92% 16%, #bfeeda 0%, transparent 60%),
    radial-gradient(74% 56% at 76% 94%, #ffdcf4 0%, transparent 64%),
    radial-gradient(66% 54% at 6% 88%, #cfe2ff 0%, transparent 62%),
    linear-gradient(180deg, #dcf45e 0%, #edf8cf 44%, #eef1e6 100%);
  transition: filter 1.2s ease;
}
body.night .backdrop {
  filter: saturate(0.6) brightness(0.93);
}

.glass {
  position: relative;
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-lip), var(--glass-drop);
  overflow: hidden;
}
.glass::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(168deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 42%);
}

.wrap {
  padding: 0 var(--gut);
  max-width: 560px;
  margin: 0 auto;
}

/* ── Шапка ──────────────────────────────────────────────────────────── */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(14px + env(safe-area-inset-top)) 0 8px;
}
.who {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
}
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: #151813;
  color: var(--lime);
  font-weight: 800;
  font-size: 16px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  color: var(--ink);
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-lip);
}
.pill i {
  font-style: normal;
  font-family: var(--emoji);
}

/* ── Питомец ────────────────────────────────────────────────────────── */
.pet {
  display: grid;
  place-items: center;
  padding: 4px 0 2px;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
}
.blob-hold {
  position: relative;
  width: 190px;
  height: 190px;
  display: grid;
  place-items: center;
  animation: drift 13s ease-in-out infinite;
}
@keyframes drift {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  24% {
    transform: translate(7px, -4px) rotate(2deg);
  }
  49% {
    transform: translate(2px, 5px) rotate(-1deg);
  }
  73% {
    transform: translate(-7px, -2px) rotate(-2.4deg);
  }
}
.pet[data-tone='warm'] .blob-hold {
  animation: drift 7s ease-in-out infinite;
}
.pet[data-tone='hot'] .blob-hold {
  animation: drift 4.4s ease-in-out infinite;
}
.shadow {
  position: absolute;
  bottom: -10px;
  left: 50%;
  width: 112px;
  height: 16px;
  margin-left: -56px;
  border-radius: 50%;
  background: rgba(60, 74, 30, 0.18);
  filter: blur(7px);
  animation: shade 4.6s ease-in-out infinite;
}
@keyframes shade {
  0%,
  100% {
    transform: scaleX(1);
    opacity: 0.5;
  }
  50% {
    transform: scaleX(0.82);
    opacity: 0.3;
  }
}
.pet[data-anim='hop'] .shadow {
  animation: shade 1.5s ease-in-out infinite;
}
.pet[data-anim='rush'] .shadow {
  animation: shade 1.05s ease-in-out infinite;
}
.pet[data-anim='boil'] .shadow {
  animation: shade 1.65s ease-in-out infinite;
}
.pet[data-anim='boilFast'] .shadow {
  animation: shade 1.02s ease-in-out infinite;
}
.pet[data-anim='slow'] .shadow,
.pet[data-anim='sink'] .shadow {
  animation: shade 7.5s ease-in-out infinite;
}
/* Блик по стеклу медленно плывёт — так он выглядит объёмным, а не плоским. */
.blob::before {
  content: '';
  position: absolute;
  inset: 6% 6% 40% 10%;
  border-radius: 50%;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 62%);
  animation: sheen 7s ease-in-out infinite;
  pointer-events: none;
}
@keyframes sheen {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.85;
  }
  50% {
    transform: translate(8px, 5px) scale(0.9);
    opacity: 0.55;
  }
}
.pet.poked .body {
  animation: squash 0.62s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes squash {
  0% {
    transform: scale(1, 1);
  }
  28% {
    transform: scale(1.18, 0.84);
  }
  58% {
    transform: translateY(-14px) scale(0.92, 1.12);
  }
  100% {
    transform: scale(1, 1);
  }
}
.body {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  animation: breathe 4.6s ease-in-out infinite;
}
.blob {
  position: absolute;
  inset: 0;
  border-radius: 40% 44% 40% 44%;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.54));
  -webkit-backdrop-filter: blur(14px) saturate(170%);
  backdrop-filter: blur(14px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.95),
    inset 0 -10px 24px rgba(255, 255, 255, 0.5),
    0 18px 40px rgba(44, 58, 22, 0.18);
  animation:
    morph 9s ease-in-out infinite,
    turn 11s ease-in-out infinite;
  transition:
    background 0.6s ease,
    box-shadow 0.6s ease;
}
/* Ромб медленно поворачивается сам по себе — лицо при этом стоит ровно. */
@keyframes turn {
  0%,
  100% {
    transform: rotate(43deg);
  }
  50% {
    transform: rotate(47.5deg);
  }
}
@keyframes morph {
  0%,
  100% {
    border-radius: 40% 44% 40% 44%;
  }
  33% {
    border-radius: 46% 38% 46% 40%;
  }
  66% {
    border-radius: 38% 46% 42% 46%;
  }
}
@keyframes breathe {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-9px) scale(1.025);
  }
}

.crest {
  position: absolute;
  z-index: 2;
  top: -4px;
  left: 50%;
  margin-left: -14px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  font-family: var(--emoji);
  font-size: 21px;
  opacity: 0;
  transform: scale(0.6);
  transition:
    opacity 0.5s,
    transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: crestFloat 3.6s ease-in-out infinite;
  z-index: 2;
}
.pet[data-crest='on'] .crest {
  opacity: 1;
  transform: scale(1);
}
@keyframes crestFloat {
  0%,
  100% {
    margin-top: 0;
  }
  50% {
    margin-top: -6px;
  }
}
.pet[data-weak='on'] .blob {
  filter: saturate(0.45) brightness(0.98);
}
.face {
  position: relative;
  width: 152px;
  height: 152px;
  overflow: visible;
}
.eyes {
  transition: transform 0.45s cubic-bezier(0.3, 1.3, 0.5, 1);
}
.eye {
  fill: #151813;
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.09s ease;
}
.eyes.shut .eye {
  transform: scaleY(0.07);
}
.eyes.narrow .eye {
  transform: scaleY(0.6);
}
.eyes.wide .eye {
  transform: scale(1.22);
}
.eyes.half .eye {
  transform: scaleY(0.42) translateY(2px);
}
.lid {
  stroke: #151813;
  stroke-width: 4;
  stroke-linecap: round;
  fill: none;
  opacity: 0;
  transition: opacity 0.3s;
}
.eyes.closedline .eye {
  opacity: 0;
}
.eyes.closedline .lid {
  opacity: 1;
}

.brow {
  stroke: #151813;
  stroke-width: 4.6;
  stroke-linecap: round;
  fill: none;
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
  transition:
    transform 0.35s cubic-bezier(0.3, 1.2, 0.5, 1),
    opacity 0.3s ease;
}
.mouthbox {
  transition: transform 0.18s ease;
  transform-box: fill-box;
  transform-origin: center;
}
.mouthbox.open {
  transform: scaleY(1.75) translateY(1px);
}
.mouth {
  stroke: #151813;
  stroke-width: 4.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  transition: d 0.4s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.blush {
  fill: #ff9d8a;
  opacity: 0;
  transition: opacity 0.4s;
}
.deco {
  position: absolute;
  font-family: var(--emoji);
  font-size: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s;
}
.d1 {
  top: 2px;
  right: 10px;
}
.d2 {
  bottom: 16px;
  left: 2px;
}
.d3 {
  top: 28px;
  left: -4px;
}

/* Состояния питомца */
.pet[data-anim='hop'] .body {
  animation: hop 1.5s ease-in-out infinite;
}
.pet[data-anim='hop'] .blob {
  animation:
    morph 9s ease-in-out infinite,
    turn 3s ease-in-out infinite;
}
@keyframes hop {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  40% {
    transform: translateY(-19px) scale(1.05);
  }
}
.pet[data-anim='rush'] .body {
  animation: rush 1.05s ease-in-out infinite;
}
.pet[data-anim='rush'] .blob {
  animation:
    morph 5s ease-in-out infinite,
    turn 2.1s ease-in-out infinite;
}
@keyframes rush {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  45% {
    transform: translateY(-11px) scale(1.02, 0.98);
  }
}
/* Злость — не тряска, а кипение: он раздувается и опадает, не переставая,
   и лицо раздувается вместе с телом, а не висит поверх него. */
.pet[data-anim='boil'] .body {
  animation: boil 1.65s ease-in-out infinite;
}
.pet[data-anim='boil'] .blob {
  animation:
    morph 5.5s ease-in-out infinite,
    turn 3.3s ease-in-out infinite,
    heat 2.4s ease-in-out infinite;
}
.pet[data-anim='boilFast'] .body {
  animation: boil 1.02s ease-in-out infinite;
}
.pet[data-anim='boilFast'] .blob {
  animation:
    morph 3.4s ease-in-out infinite,
    turn 2s ease-in-out infinite,
    heat 1.3s ease-in-out infinite;
}
@keyframes boil {
  0%,
  100% {
    transform: scale(1, 1);
  }
  32% {
    transform: scale(1.06, 0.945);
  }
  66% {
    transform: scale(0.955, 1.05);
  }
}
@keyframes heat {
  0%,
  100% {
    filter: saturate(1) brightness(1);
  }
  50% {
    filter: saturate(1.4) brightness(1.04);
  }
}
.pet[data-anim='slow'] .body {
  animation: breathe 7.5s ease-in-out infinite;
}
.pet[data-anim='slow'] .blob {
  animation:
    morph 16s ease-in-out infinite,
    turn 18s ease-in-out infinite;
}
.pet[data-anim='sink'] .body {
  animation: sink 5s ease-in-out infinite;
}
.pet[data-anim='sink'] .blob {
  animation:
    morph 12s ease-in-out infinite,
    turn 14s ease-in-out infinite;
}
@keyframes sink {
  0%,
  100% {
    transform: translateY(2px) scale(0.97);
  }
  50% {
    transform: translateY(8px) scale(0.95);
  }
}
.pet[data-anim='cheer'] .body {
  animation: cheer 0.62s cubic-bezier(0.34, 1.56, 0.64, 1) 2;
}
.pet[data-anim='cheer'] .blob {
  animation:
    morph 2s ease-in-out infinite,
    turn 1.2s ease-in-out infinite;
}
@keyframes cheer {
  0% {
    transform: translateY(0) scale(1);
  }
  35% {
    transform: translateY(-30px) scale(1.09);
  }
  70% {
    transform: translateY(0) scale(0.95);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

.pet[data-tone='warm'] .blob {
  background: linear-gradient(150deg, rgba(255, 214, 196, 0.92), rgba(255, 176, 146, 0.6));
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.9),
    0 18px 40px rgba(140, 60, 30, 0.22);
}
.pet[data-tone='hot'] .blob {
  background: linear-gradient(150deg, rgba(255, 186, 160, 0.96), rgba(255, 138, 104, 0.72));
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.85),
    0 20px 44px rgba(150, 52, 20, 0.3);
}
.pet[data-tone='lime'] .blob {
  background: linear-gradient(150deg, rgba(238, 252, 172, 0.95), rgba(206, 238, 92, 0.7));
}
.pet[data-tone='night'] .blob {
  background: linear-gradient(150deg, rgba(222, 228, 246, 0.9), rgba(190, 200, 228, 0.62));
}
.pet[data-deco='on'] .deco {
  opacity: 1;
  animation: twinkle 1.6s ease-in-out infinite;
}
.d2 {
  animation-delay: 0.45s !important;
}
.d3 {
  animation-delay: 0.9s !important;
}
@keyframes twinkle {
  0%,
  100% {
    transform: scale(0.72) rotate(-8deg);
    opacity: 0.55;
  }
  50% {
    transform: scale(1.14) rotate(10deg);
    opacity: 1;
  }
}
.pet[data-blush='on'] .blush {
  opacity: 0.55;
}

.say {
  margin: 6px auto 16px;
  max-width: 320px;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
}
.say.flip {
  animation: sayIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes sayIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.why {
  display: block;
  margin: -8px auto 14px;
  border: none;
  cursor: pointer;
  font: inherit;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 8px 15px;
  border-radius: 999px;
  color: var(--ink-soft);
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-lip);
  animation: pulseSoft 2.8s ease-in-out infinite;
  transition: transform 0.2s;
}
.why:active {
  transform: scale(0.94);
}
@keyframes pulseSoft {
  0%,
  100% {
    box-shadow:
      var(--glass-lip),
      0 0 0 0 rgba(21, 24, 19, 0.09);
  }
  50% {
    box-shadow:
      var(--glass-lip),
      0 0 0 7px rgba(21, 24, 19, 0);
  }
}
.whyText {
  max-width: 330px;
  margin: -4px auto 16px;
  text-align: center;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink-soft);
  animation: sayIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.whyText b {
  color: var(--ink);
  font-weight: 800;
}
.say b {
  font-weight: 800;
}
.pet[data-tone='warm'] ~ .say,
.pet[data-tone='hot'] ~ .say {
  color: #8e4327;
}
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ── Карточки ───────────────────────────────────────────────────────── */
.card {
  border-radius: var(--r);
  padding: 20px;
  margin-bottom: 14px;
}
.cap {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 12px;
}
.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 20px 2px 10px;
}
.sec-head .cap {
  margin: 0;
}
.sec-head small {
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 700;
}
.mini {
  width: 34px;
  height: 34px;
  flex: none;
  border: none;
  cursor: pointer;
  border-radius: 12px;
  background: #151813;
  color: var(--lime);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 16px rgba(21, 24, 19, 0.22);
  transition: transform 0.2s;
}
.mini:active {
  transform: scale(0.9);
}
.mini.soft {
  background: rgba(255, 255, 255, 0.66);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.progress-num {
  font-size: 50px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}
.progress-num small {
  font-size: 22px;
  margin-left: 2px;
}
.progress-word {
  text-align: right;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-soft);
  max-width: 150px;
}
.bar {
  height: 12px;
  border-radius: 999px;
  background: rgba(21, 24, 19, 0.09);
  margin-top: 16px;
  overflow: hidden;
  display: flex;
}
.bar i {
  display: block;
  height: 100%;
  width: 0;
  transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.bar .hit {
  background: linear-gradient(90deg, var(--lime), var(--lime-deep));
  border-radius: 999px;
}
.bar .miss {
  background: rgba(255, 155, 122, 0.75);
}
.lost {
  margin-top: 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: #a4603f;
}

/* ── Строки ─────────────────────────────────────────────────────────── */
.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.row {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 22px;
  padding: 12px 14px;
  animation: rowIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
  width: 100%;
  text-align: left;
  font: inherit;
  color: var(--ink);
  transition:
    transform 0.22s cubic-bezier(0.34, 1.4, 0.64, 1),
    opacity 0.3s,
    background 0.35s,
    border-color 0.35s;
}
@keyframes rowIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.row.tap {
  cursor: pointer;
}
.row.tap:active {
  transform: scale(0.975);
}
.row.just {
  animation: justDone 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes justDone {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.035);
  }
  100% {
    transform: scale(1);
  }
}
.row > * {
  position: relative;
  z-index: 1;
}
.tile {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-family: var(--emoji);
  background: rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition:
    filter 0.3s,
    opacity 0.3s;
}
.tile.sun {
  background: rgba(255, 224, 160, 0.66);
}
.tile.sky {
  background: rgba(178, 208, 255, 0.6);
}
.tile.mint {
  background: rgba(168, 232, 205, 0.6);
}
.tile.rose {
  background: rgba(255, 196, 225, 0.55);
}
.tile.lime {
  background: rgba(214, 242, 75, 0.7);
}
.meat {
  flex: 1;
  min-width: 0;
}
.meat b {
  display: block;
  /* Длинные названия пар не должны налезать на колонку времени, но
     обычные слова переносятся целиком: break-word, а не anywhere. */
  overflow-wrap: break-word;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}
.meat small {
  display: block;
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 3px;
  font-weight: 600;
}
.tag {
  display: inline-block;
  margin-left: 7px;
  padding: 2px 7px;
  border-radius: 7px;
  vertical-align: 1px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.tag.now {
  background: #151813;
  color: var(--lime);
}
.tag.miss {
  background: rgba(255, 155, 122, 0.5);
  color: #8e4327;
}
.tag.soon {
  background: rgba(255, 224, 160, 0.9);
  color: #8a6a18;
}

.mark {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  border: none;
  padding: 0;
  cursor: pointer;
  background: rgba(21, 24, 19, 0.07);
  transition:
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    background 0.25s;
}
.mark svg {
  width: 18px;
  height: 18px;
}
.mark svg path,
.mark svg circle {
  stroke: rgba(21, 24, 19, 0.28);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  transition: stroke 0.25s;
}
.row.on .mark {
  background: #151813;
}
.row.on .mark svg path {
  stroke: var(--lime);
}
.row.on .meat b {
  text-decoration: line-through;
  text-decoration-color: rgba(21, 24, 19, 0.3);
}
.row.on {
  opacity: 0.62;
}
.mark.pop {
  animation: pop 0.42s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes pop {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.34);
  }
  100% {
    transform: scale(1);
  }
}
.mark.nope {
  animation: nope 0.4s ease;
}
@keyframes nope {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

.mark.auto {
  background: transparent;
  border: 1.5px dashed rgba(21, 24, 19, 0.16);
  cursor: default;
}
.mark.auto::before {
  content: '';
  width: 12px;
  height: 2px;
  border-radius: 2px;
  background: rgba(21, 24, 19, 0.2);
}
.mark.locked {
  background: rgba(21, 24, 19, 0.045);
}
.mark.locked svg path,
.mark.locked svg circle {
  stroke: rgba(21, 24, 19, 0.2);
}
.mark.missed {
  background: rgba(255, 255, 255, 0.42);
}
.mark.missed svg path {
  stroke: #c53a1c;
}
/* Упущенное видно с первого взгляда — красным, без разглядывания подписей. */
.row.missed {
  background: linear-gradient(140deg, rgba(252, 92, 64, 0.56), rgba(236, 60, 32, 0.44));
  border-color: rgba(214, 60, 30, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 10px 26px rgba(170, 50, 25, 0.22);
  animation:
    rowIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both,
    missPulse 3.4s ease-in-out 0.6s infinite;
}
@keyframes missPulse {
  0%,
  100% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.5),
      0 10px 26px rgba(170, 50, 25, 0.22);
  }
  50% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.5),
      0 10px 30px rgba(170, 50, 25, 0.4);
  }
}
.row.missed::after {
  background: linear-gradient(168deg, rgba(255, 255, 255, 0.26) 0%, rgba(255, 255, 255, 0) 40%);
}
.row.missed .tile {
  background: rgba(255, 255, 255, 0.5);
  filter: grayscale(0.55);
}
.row.missed .meat b,
.row.missed .meat small {
  color: #5e1607;
}
.row.missed .tag.miss {
  background: #c53a1c;
  color: #fff2ec;
}
.row.live {
  border-color: rgba(21, 24, 19, 0.5);
  box-shadow:
    var(--glass-lip),
    0 12px 30px rgba(44, 58, 22, 0.2);
}
.row.early .meat b,
.row.early .meat small {
  color: var(--ink-faint);
}

/* ── Привычки ───────────────────────────────────────────────────────── */
.hab {
  display: flex;
  align-items: center;
  gap: 13px;
  border-radius: 22px;
  padding: 12px 15px;
}
.hab > * {
  position: relative;
  z-index: 1;
}
.dots {
  display: flex;
  gap: 4px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.dots span {
  width: 15px;
  height: 7px;
  border-radius: 999px;
  background: rgba(21, 24, 19, 0.12);
  transition:
    background 0.3s,
    transform 0.3s;
}
.dots span.fill {
  background: var(--lime-deep);
}
.plus {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex: none;
  border: none;
  cursor: pointer;
  background: rgba(21, 24, 19, 0.07);
  color: var(--ink);
  font-size: 21px;
  font-weight: 700;
  display: grid;
  place-items: center;
  transition:
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    background 0.25s,
    color 0.25s;
}
.hab.full .plus {
  background: #151813;
  color: var(--lime);
}
.plus.pop {
  animation: pop 0.42s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.del {
  width: 30px;
  height: 30px;
  flex: none;
  border: none;
  cursor: pointer;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-faint);
  font-size: 16px;
}

/* ── Кнопки, поля ───────────────────────────────────────────────────── */
.field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
}
.field + .field {
  border-top: 1px solid rgba(21, 24, 19, 0.07);
}
.field label {
  font-size: 15px;
  font-weight: 600;
}
.field input,
.field select {
  font: inherit;
  font-weight: 700;
  text-align: right;
  border: none;
  border-radius: 13px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  max-width: 160px;
}
.field input[type='number'] {
  max-width: 86px;
  text-align: center;
}
.btn {
  display: block;
  width: 100%;
  border: none;
  cursor: pointer;
  border-radius: 18px;
  padding: 15px;
  font: inherit;
  font-weight: 800;
  font-size: 15px;
  background: #151813;
  color: var(--lime);
  box-shadow: 0 10px 24px rgba(21, 24, 19, 0.22);
  transition: transform 0.2s;
}
.btn:active {
  transform: scale(0.98);
}
.btn.ghost {
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.adder {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.adder input[type='text'] {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-weight: 600;
  border: none;
  border-radius: 15px;
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.adder input[type='number'] {
  flex: none;
  width: 68px;
  font: inherit;
  font-weight: 700;
  text-align: center;
  border: none;
  border-radius: 15px;
  padding: 13px 6px;
  background: rgba(255, 255, 255, 0.66);
}
.adder button {
  flex: none;
  width: 50px;
  border: none;
  border-radius: 15px;
  cursor: pointer;
  background: #151813;
  color: var(--lime);
  font-size: 22px;
}
.empty {
  text-align: center;
  padding: 20px 10px;
  color: var(--ink-faint);
  font-size: 14px;
  font-weight: 600;
}

.nav-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  border: none;
  cursor: pointer;
  font: inherit;
  border-radius: 22px;
  padding: 16px;
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-lip), var(--glass-drop);
  margin-bottom: 10px;
  color: var(--ink);
  transition: transform 0.2s;
}
.nav-row:active {
  transform: scale(0.985);
}
.nav-row b {
  display: block;
  font-size: 16px;
  font-weight: 700;
}
.nav-row small {
  display: block;
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 600;
  margin-top: 2px;
}
.nav-row .chev {
  margin-left: auto;
  color: var(--ink-faint);
  font-size: 20px;
  font-weight: 700;
}
.back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: none;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  font-size: 14px;
  color: var(--ink);
  background: transparent;
  padding: 6px 0;
  margin-bottom: 6px;
}

/* ── Календарь ──────────────────────────────────────────────────────── */
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.cal-head b {
  font-size: 18px;
  font-weight: 800;
  text-transform: capitalize;
}
.cal-nav {
  display: flex;
  gap: 6px;
}
.cal-nav button {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.6);
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.cal-dow {
  text-align: center;
  font-size: 10.5px;
  font-weight: 800;
  color: var(--ink-faint);
  padding-bottom: 6px;
  text-transform: uppercase;
}
.cal-cell {
  position: relative;
  aspect-ratio: 1;
  border: none;
  cursor: pointer;
  background: transparent;
  display: grid;
  place-items: center;
  padding: 0;
}
.ring {
  position: absolute;
  inset: 11%;
  border-radius: 50%;
  background: conic-gradient(var(--lime-deep) calc(var(--p) * 1%), rgba(21, 24, 19, 0.16) 0);
  -webkit-mask: radial-gradient(circle closest-side, transparent 64%, #000 67%);
  mask: radial-gradient(circle closest-side, transparent 64%, #000 67%);
  transition: background 0.5s;
}
.cal-cell.goal .ring {
  background: conic-gradient(#151813 calc(var(--p) * 1%), rgba(21, 24, 19, 0.16) 0);
}
.cal-cell span {
  position: relative;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}
.cal-cell.out span {
  color: rgba(21, 24, 19, 0.22);
}
.cal-cell.out .ring {
  display: none;
}
.cal-cell.today span {
  color: var(--lime-deep);
  font-weight: 800;
}
.cal-cell.today::after {
  content: '';
  position: absolute;
  inset: 4%;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(21, 24, 19, 0.4);
}
.cal-cell.sel {
  background: #151813;
  border-radius: 14px;
}
.cal-cell.sel span {
  color: var(--lime);
}
.cal-cell.sel .ring {
  opacity: 0.35;
}
.cal-cell i {
  position: absolute;
  bottom: 3px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--warm);
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.stat {
  border-radius: 20px;
  padding: 14px 10px;
  text-align: center;
}
.stat b {
  display: block;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}
.stat small {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-top: 6px;
}
.heat {
  display: flex;
  gap: 3px;
  margin-top: 4px;
}
.heat i {
  flex: 1;
  height: 28px;
  border-radius: 7px;
  background: rgba(21, 24, 19, 0.1);
}

/* ── Чат ────────────────────────────────────────────────────────────── */
.chat-hello {
  text-align: center;
  padding: 14px 6px 2px;
}
.chat-hello h2 {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}
.chat-hello p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
  font-weight: 600;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(214, 242, 75, 0.75);
  color: #4d5a12;
}
.chips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 16px 0 6px;
}
.chip {
  border: none;
  cursor: pointer;
  text-align: left;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  border-radius: 17px;
  padding: 13px 14px;
  color: var(--ink);
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-lip);
  transition: transform 0.2s;
}
.chip:active {
  transform: scale(0.97);
}
.thread {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 6px 0 12px;
}
.msg {
  max-width: 86%;
  animation: fadeUp 0.4s ease both;
}
.msg.me {
  align-self: flex-end;
  background: #151813;
  color: #f2f6e4;
  border-radius: 20px 20px 6px 20px;
  padding: 12px 16px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.45;
  box-shadow: 0 8px 20px rgba(21, 24, 19, 0.2);
}
.msg.ai {
  align-self: flex-start;
  border-radius: 20px 20px 20px 6px;
  padding: 14px 16px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink);
  background: var(--glass-strong);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-lip), var(--glass-drop);
}
.dotting {
  display: inline-flex;
  gap: 4px;
}
.dotting i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-faint);
  animation: wave 1.1s infinite;
}
.dotting i:nth-child(2) {
  animation-delay: 0.15s;
}
.dotting i:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes wave {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-5px);
    opacity: 1;
  }
}
.composer {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(84px + env(safe-area-inset-bottom));
  width: min(560px, calc(100% - 2 * var(--gut)));
  display: flex;
  gap: 8px;
  align-items: center;
  z-index: 30;
  border-radius: 999px;
  padding: 7px 7px 7px 18px;
  background: var(--glass-strong);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-edge);
  box-shadow:
    var(--glass-lip),
    0 14px 32px rgba(44, 58, 22, 0.18);
}
.composer input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  outline: none;
}
.composer button {
  width: 44px;
  height: 44px;
  flex: none;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  background: #151813;
  display: grid;
  place-items: center;
}
.composer button svg {
  width: 19px;
  height: 19px;
  stroke: var(--lime);
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hist {
  border-radius: 22px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.hist > * {
  position: relative;
  z-index: 1;
}
.hist .q {
  font-size: 14.5px;
  font-weight: 700;
}
.hist .a {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-top: 5px;
  line-height: 1.45;
}
.hist .acts {
  display: flex;
  gap: 6px;
  margin-top: 11px;
}
.hist .acts button {
  border: none;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  border-radius: 11px;
  padding: 7px 11px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink-soft);
  font-family: inherit;
}
.hist .acts button.on {
  background: #151813;
  color: var(--lime);
}
.hist.pin {
  border-color: rgba(21, 24, 19, 0.4);
}
.day-sep {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 20px 2px 10px;
}

/* ── Нижняя панель ──────────────────────────────────────────────────── */
nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(14px + env(safe-area-inset-bottom));
  display: flex;
  gap: 6px;
  padding: 7px;
  border-radius: 999px;
  z-index: 40;
  background: rgba(16, 18, 14, 0.58);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 16px 34px rgba(20, 28, 10, 0.3);
}
nav button {
  width: 54px;
  height: 50px;
  border-radius: 999px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition:
    background 0.25s,
    transform 0.25s;
}
nav button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: rgba(255, 255, 255, 0.72);
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.25s;
}
nav button.active {
  background: var(--lime);
}
nav button.active svg {
  stroke: #151813;
}
nav button:active {
  transform: scale(0.92);
}

/* ── Шторка и тост ──────────────────────────────────────────────────── */
.veil {
  position: fixed;
  inset: 0;
  background: rgba(20, 26, 12, 0.34);
  z-index: 60;
  animation: fade 0.3s ease both;
}
@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.sheet {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  z-index: 61;
  width: min(560px, 100%);
  border-radius: 28px 28px 0 0;
  padding: 20px var(--gut) calc(24px + env(safe-area-inset-bottom));
  background: var(--glass-strong);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-edge);
  box-shadow: 0 -18px 50px rgba(30, 40, 14, 0.25);
  animation: up 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes up {
  from {
    transform: translate(-50%, 100%);
  }
  to {
    transform: translate(-50%, 0);
  }
}
.sheet h3 {
  margin: 4px 0 16px;
  font-size: 20px;
  font-weight: 800;
}
.grab {
  width: 42px;
  height: 5px;
  border-radius: 999px;
  background: rgba(21, 24, 19, 0.18);
  margin: -6px auto 14px;
}
.picks {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 10px 0 14px;
}
.pick {
  border: none;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  border-radius: 13px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
}
.pick.on {
  background: #151813;
  color: var(--lime);
}
.toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(90px + env(safe-area-inset-bottom));
  z-index: 70;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  background: rgba(16, 18, 14, 0.86);
  color: #f2f6e4;
  box-shadow: 0 14px 30px rgba(20, 28, 10, 0.3);
  animation: toast 2.6s ease both;
  pointer-events: none;
  max-width: calc(100% - 40px);
  text-align: center;
}
@keyframes toast {
  0% {
    opacity: 0;
    transform: translate(-50%, 14px);
  }
  12%,
  82% {
    opacity: 1;
    transform: translate(-50%, 0);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, 10px);
  }
}

/* ── Фокус ──────────────────────────────────────────────────────────── */
.focus {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  padding: 30px var(--gut) calc(40px + env(safe-area-inset-bottom));
  background: rgba(240, 244, 228, 0.66);
  -webkit-backdrop-filter: blur(26px) saturate(160%);
  backdrop-filter: blur(26px) saturate(160%);
  animation: fade 0.35s ease both;
}
.focus .slot {
  width: 160px;
  height: 160px;
  display: grid;
  place-items: center;
}
.focus .slot .pet {
  transform: scale(0.78);
  transform-origin: center;
}
.focus-ring {
  position: relative;
  width: min(244px, 64vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  margin-top: 2px;
}
.focus-ring .track {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(var(--lime-deep) calc(var(--p) * 1%), rgba(21, 24, 19, 0.1) 0);
  -webkit-mask: radial-gradient(circle closest-side, transparent 86%, #000 88%);
  mask: radial-gradient(circle closest-side, transparent 86%, #000 88%);
  transition: background 1s linear;
}
.focus-time {
  font-size: clamp(40px, 14vw, 56px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.focus-name {
  margin-top: 8px;
  font-size: 17px;
  font-weight: 700;
}
.focus-sub {
  margin-top: 4px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
}
.focus-acts {
  display: flex;
  gap: 10px;
  width: min(420px, 100%);
  margin-top: 26px;
}
.focus-acts .btn {
  flex: 1;
}
.focus-hint {
  margin-top: 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-faint);
  max-width: 300px;
}
body.focusing nav,
body.focusing .composer {
  display: none !important;
}

/* ── Разбор дня ─────────────────────────────────────────────────────── */
.rev {
  border-radius: 22px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.rev > * {
  position: relative;
  z-index: 1;
}
.rev b {
  font-size: 15px;
  font-weight: 700;
  display: block;
}
.rev small {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
}
.rev .why3 {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.rev .why3 button {
  flex: 1;
  border: none;
  cursor: pointer;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 12px;
  padding: 9px 6px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink-soft);
  transition:
    transform 0.2s,
    background 0.25s,
    color 0.25s;
}
.rev .why3 button.on {
  background: #151813;
  color: var(--lime);
}
.rev .why3 button:active {
  transform: scale(0.94);
}
.callout {
  display: flex;
  align-items: center;
  gap: 13px;
  border-radius: 22px;
  padding: 15px 16px;
  margin-bottom: 14px;
  width: 100%;
  border: none;
  font: inherit;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
  animation: rowIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: transform 0.2s;
}
.callout:active {
  transform: scale(0.98);
}
.callout b {
  display: block;
  font-size: 15.5px;
  font-weight: 800;
}
.callout small {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-top: 2px;
}
.callout .chev {
  margin-left: auto;
  font-size: 20px;
  color: var(--ink-faint);
}
.insight {
  border-radius: 22px;
  padding: 15px 17px;
  margin-bottom: 10px;
}
.insight > * {
  position: relative;
  z-index: 1;
}
.insight b {
  display: block;
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 4px;
}
.insight small {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  line-height: 1.45;
}

.view {
  animation: viewIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.card {
  animation: rowIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hab {
  animation: rowIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.nav-row {
  animation: rowIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.chip {
  animation: rowIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.stat {
  animation: rowIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.cal-cell {
  animation: cellIn 0.4s ease both;
}
@keyframes cellIn {
  from {
    opacity: 0;
    transform: scale(0.78);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.progress-num {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.progress-num.bump {
  transform: scale(1.12);
}
.bar .hit {
  position: relative;
  overflow: hidden;
}
.bar .hit::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.75) 50%, transparent 80%);
  animation: shimmer 2.8s ease-in-out infinite;
}
@keyframes shimmer {
  0% {
    transform: translateX(-120%);
  }
  55%,
  100% {
    transform: translateX(220%);
  }
}
.dots span.fill {
  animation: dotIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes dotIn {
  from {
    transform: scaleX(0.2);
  }
  to {
    transform: scaleX(1);
  }
}
nav button.active svg {
  animation: navPop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes navPop {
  0% {
    transform: scale(0.7);
  }
  55% {
    transform: scale(1.22);
  }
  100% {
    transform: scale(1);
  }
}
.pill i {
  display: inline-block;
  animation: flame 2.4s ease-in-out infinite;
}
@keyframes flame {
  0%,
  100% {
    transform: scale(1) rotate(-3deg);
  }
  50% {
    transform: scale(1.16) rotate(5deg);
  }
}
.conf {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  z-index: 65;
  pointer-events: none;
}
.lost {
  animation: sayIn 0.4s ease both;
}
[hidden] {
  display: none !important;
}

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

/* Значок привычки правится прямо в списке: поле выглядит как плитка. */
.ico {
  flex: none;
  border: none;
  text-align: center;
  font: inherit;
  font-size: 22px;
  font-family: var(--emoji);
  color: var(--ink);
  padding: 0;
  width: 46px;
  height: 46px;
  cursor: text;
}
.ico:focus {
  outline: 2px solid rgba(21, 24, 19, 0.35);
  outline-offset: 1px;
}

/* В строке добавления значок не должен растягиваться наравне с названием:
   правило для текстовых полей формы перебивает .ico по весу селектора. */
.adder input.ico {
  flex: none;
  width: 46px;
  min-width: 46px;
}
.adder input[type='number'] {
  width: 58px;
}

/* ── Колонка времени ────────────────────────────────────────────────────
   Раньше время, аудитория и длительность шли одной строкой через точки:
   она не читалась и на узком экране рвалась пополам. Теперь это правый
   столбец — крупное число и подпись под ним, одинаково у всех строк. */
.when {
  flex: none;
  width: 56px;
  text-align: right;
  line-height: 1.15;
}
.when b {
  display: block;
  font-size: 14.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.when small {
  display: block;
  margin-top: 3px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
}
.when.is-now b {
  color: #5f7212;
}
.when.is-now small {
  color: #6f7a2e;
}
.when.is-done small {
  color: var(--lime-deep);
}
.row.missed .when b {
  color: #5e1607;
}
.when.is-miss small {
  color: #a82a0c;
}
.row.early .when b,
.row.early .when small {
  color: var(--ink-faint);
}

/* На очень узких экранах (320 пикселей) колонка времени и плитка съедают
   место у названия, и слова начинают переноситься по буквам. Сжимаем всё
   понемногу, чтобы название снова помещалось целиком. */
@media (max-width: 360px) {
  .row {
    gap: 8px;
    padding: 12px;
  }
  .tile {
    width: 38px;
    height: 38px;
    font-size: 19px;
  }
  .when {
    width: 50px;
  }
  .when b {
    font-size: 13.5px;
  }
  .mark {
    width: 36px;
    height: 36px;
  }
  .meat b {
    font-size: 15px;
  }
}

/* Питомец лежит в своей коробке: без неё у поворота нет точки опоры
   и фигуру уводит за край кадра. */
.actor {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transition: opacity 0.35s ease;
}

