/* ================= login ================= */
.login-lang {
  width: fit-content;
  margin: 0 0 0 auto;
}

.login-wrap {
  min-height: 80dvh;
  display: grid;
  place-items: center;
}

.login-card {
  width: min(420px, 100%);
  padding: 34px 28px;
  border-radius: var(--radius-l);
  background: var(--paper);
  box-shadow: var(--shadow-l);
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: center;
  animation: pop-in 0.6s var(--spring) both;
}

.login-card .field {
  text-align: left;
}

.login-card p {
  margin: 0;
}

.login-icon {
  width: 110px;
  height: 110px;
  margin: -80px auto 0;
  filter: drop-shadow(0 10px 18px rgba(142, 108, 255, 0.35));
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  50% {
    transform: translateY(-8px) rotate(-2deg);
  }
}

/* ================= hub ================= */
.hub {
  display: grid;
  gap: clamp(14px, 2vw, 22px);
  max-width: 1400px;
  margin: 0 auto;
}

.hub-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(14px, 2vw, 22px);
}

.hub-clock {
  padding: 22px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.clock-greet {
  font-size: clamp(18px, 2.2vw, 24px);
  color: var(--ink-soft);
}

.clock-time {
  font-size: clamp(64px, 10vw, 128px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, var(--grape), var(--berry), var(--tangerine));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}

.clock-colon {
  animation: blink 2s steps(1) infinite;
  display: inline-block;
  transform: translateY(-0.06em);
}

@keyframes blink {
  50% {
    opacity: 0.25;
  }
}

.clock-date {
  font-size: clamp(18px, 2.4vw, 26px);
  text-transform: capitalize;
}

.hub-weather {
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(160deg, rgba(222, 242, 255, 0.92), rgba(255, 255, 255, 0.85));
}

.weather-icon {
  width: clamp(96px, 13vw, 150px);
  height: clamp(96px, 13vw, 150px);
  flex: none;
}

.weather-temp {
  font-size: clamp(48px, 7vw, 84px);
  font-weight: 900;
  line-height: 1;
}

.weather-label {
  font-size: 20px;
}

.weather-range {
  display: flex;
  gap: 12px;
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 16px;
}

.weather-range .hi {
  color: #e2662a;
}

.weather-range .lo {
  color: #2f8fd6;
}

.weather-place {
  font-size: 13px;
  color: var(--ink-faint);
}

.weather-skeleton {
  height: 120px;
  width: 100%;
  border-radius: 20px;
  background: linear-gradient(90deg, rgba(45, 42, 74, 0.04), rgba(45, 42, 74, 0.09), rgba(45, 42, 74, 0.04));
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

.hub-children {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  gap: clamp(14px, 2vw, 22px);
}

.hub-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 32px 20px;
  border-radius: var(--radius-l);
  text-align: center;
  font-weight: 700;
}

.hub-empty p {
  margin: 0;
}

.child-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 24px);
  padding: clamp(18px, 2.5vw, 28px);
  min-height: clamp(180px, 24vw, 260px);
  border-radius: 40px;
  color: var(--white);
  text-decoration: none;
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.35), transparent 40%),
    linear-gradient(145deg, color-mix(in srgb, var(--child) 75%, #fff), var(--child));
  box-shadow:
    0 6px 0 color-mix(in srgb, var(--child) 65%, #000),
    0 22px 40px color-mix(in srgb, var(--child) 35%, transparent);
  transition: transform 0.25s var(--spring);
  isolation: isolate;
}

.child-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 10% 90%, rgba(255, 255, 255, 0.18) 0 60px, transparent 61px),
    radial-gradient(circle at 70% 110%, rgba(255, 255, 255, 0.12) 0 90px, transparent 91px);
}

.child-card:active {
  transform: scale(0.97) translateY(4px);
}

.child-avatar {
  width: clamp(110px, 15vw, 180px);
  height: clamp(110px, 15vw, 180px);
  flex: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  padding: 6px;
  animation: float 5s ease-in-out infinite;
}

.child-body {
  flex: 1;
  min-width: 0;
}

.child-name {
  font-size: clamp(34px, 5vw, 56px);
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.12);
}

.child-status {
  font-size: clamp(16px, 2vw, 21px);
  margin-top: 4px;
  opacity: 0.95;
  display: flex;
  align-items: center;
  gap: 6px;
}

.child-status.done {
  font-size: clamp(20px, 2.6vw, 28px);
  color: #fff6c9;
  animation: wiggle 2.4s ease-in-out infinite;
}

@keyframes wiggle {
  0%,
  100% {
    transform: rotate(0);
  }
  10% {
    transform: rotate(-4deg) scale(1.05);
  }
  20% {
    transform: rotate(3deg) scale(1.05);
  }
  30% {
    transform: rotate(0);
  }
}

.child-extra {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.child-plant {
  width: 64px;
  height: 64px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 20px;
}

.child-snail {
  width: 80px;
  height: 64px;
}

.child-points strong {
  font-size: 30px;
}

.child-points span {
  opacity: 0.85;
}

.child-points small {
  display: block;
  font-size: 13px;
  opacity: 0.85;
}

.ring {
  --size: clamp(72px, 9vw, 104px);
  width: var(--size);
  height: var(--size);
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 900;
  background:
    radial-gradient(closest-side, color-mix(in srgb, var(--child) 70%, #000) 74%, transparent 75% 100%),
    conic-gradient(#fff calc(var(--pct) * 1%), rgba(255, 255, 255, 0.25) 0);
}

.is-complete .ring {
  background: radial-gradient(circle, #fff6c9, var(--sunny));
  color: #b77900;
  animation: glow 1.8s ease-in-out infinite;
}

.ring-star {
  font-size: 44px;
}

@keyframes glow {
  50% {
    box-shadow: 0 0 0 12px rgba(255, 200, 61, 0.35);
    transform: scale(1.06);
  }
}

.hub-bottom {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: clamp(14px, 2vw, 22px);
}

.hub-highlight {
  padding: 20px 24px;
}

.hl-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--berry);
  font-size: 18px;
  margin-bottom: 10px;
}

.fact-text {
  margin: 0;
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.45;
}

a.fact {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s var(--spring);
}

a.fact:active {
  transform: scale(0.98);
}

.hub-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px;
}

.nav-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 10px;
  border-radius: 28px;
  background: var(--white);
  text-decoration: none;
  text-align: center;
  font-size: 18px;
  box-shadow:
    0 5px 0 color-mix(in srgb, var(--c) 45%, #fff),
    var(--shadow-m);
  transition: transform 0.2s var(--spring);
}

.nav-tile:active {
  transform: translateY(5px);
}

.nav-icon {
  width: 64px;
  height: 64px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  font-size: 32px;
  color: var(--white);
  background: var(--c);
  box-shadow: 0 4px 0 color-mix(in srgb, var(--c) 70%, #000);
}

/* ================= week (child page) ================= */
.wk-head {
  display: grid;
  grid-template-columns: auto 1fr 1.3fr auto auto;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  margin-bottom: 14px;
  border-radius: var(--radius-l);
  background: linear-gradient(135deg, color-mix(in srgb, var(--child) 16%, #fff), #fff);
  box-shadow: var(--shadow-m);
}

.wk-who {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wk-avatar {
  width: 72px;
  height: 72px;
}

.wk-name {
  font-size: 26px;
  font-weight: 900;
  color: var(--child);
}

.wk-counters {
  display: flex;
  gap: 10px;
}

.counter {
  position: relative;
  flex: 1;
  min-width: 82px;
  padding: 8px 12px;
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow-s);
  text-align: center;
}

.counter span {
  display: block;
  font-size: 12px;
  color: var(--ink-soft);
  white-space: nowrap;
}

.counter .count {
  display: inline-block;
  font-size: 30px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.c-week {
  background: linear-gradient(180deg, #fff, #f3eeff);
}

.c-week .count {
  color: var(--grape);
}

.c-total .count {
  color: #e2662a;
}

.equation {
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translate(-50%, 6px);
  padding: 4px 10px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--sunny);
  font-size: 15px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  z-index: 5;
}

.equation.show {
  animation: equation 3s var(--smooth) both;
}

@keyframes equation {
  0% {
    opacity: 0;
    transform: translate(-50%, 0) scale(0.6);
  }
  12%,
  80% {
    opacity: 1;
    transform: translate(-50%, 6px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, 6px) scale(1);
  }
}

.wk-goal {
  min-width: 0;
}

.goal-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 15px;
  margin-bottom: 6px;
}

.goal-label {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.goal-togo {
  color: var(--ink-soft);
  white-space: nowrap;
}

.goal-track {
  position: relative;
  height: 22px;
  border-radius: 999px;
  background: rgba(45, 42, 74, 0.08);
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(45, 42, 74, 0.1);
}

.goal-track.small {
  height: 14px;
}

.goal-fill {
  position: relative;
  height: 100%;
  border-radius: 999px;
  overflow: hidden;
  background: linear-gradient(90deg, var(--grape), var(--berry), var(--tangerine));
  transition: width 0.9s var(--spring);
}

/* the stripes slide as a layer instead of repainting the bar every frame */
.goal-fill::after {
  content: "";
  position: absolute;
  inset: 0 0 0 -28px;
  background: repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.25) 0 10px, transparent 10px 20px);
  background-size: 28px 28px;
  animation: stripes-slide 1s linear infinite;
  pointer-events: none;
}

@keyframes stripes-slide {
  to {
    transform: translateX(28px);
  }
}

@keyframes stripes {
  to {
    background-position:
      28px 0,
      0 0;
  }
}

.goal-flag {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: var(--ink-soft);
}

.wk-plant,
.wk-album {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow-s);
  display: grid;
  place-items: center;
  text-decoration: none;
  transition: transform 0.2s var(--spring);
}

.wk-album {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px;
}

.wk-plant:active,
.wk-album:active {
  transform: scale(0.92);
}

.wk-plant-img {
  width: 76px;
  height: 76px;
  animation: sway 4s ease-in-out infinite;
  transform-origin: 50% 90%;
}

@keyframes sway {
  50% {
    transform: rotate(3deg);
  }
}

.garden-badge {
  position: absolute;
  bottom: -6px;
  right: -6px;
  padding: 2px 6px;
  border-radius: 10px;
  background: var(--berry);
  color: var(--white);
  font-size: 12px;
}

.album-img {
  width: 52px;
  height: 52px;
}

.album-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: 14px;
  background: var(--sunny);
  color: #7a4a00;
  display: grid;
  place-items: center;
  font-weight: 900;
  box-shadow: 0 2px 0 #e0a516;
}

.wk-album small {
  font-size: 10px;
  line-height: 1.1;
  text-align: center;
  color: var(--ink-soft);
}

/* fixed middle column: the arrows stay put whatever the date and the Today chip take */
.week-nav {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  max-width: 460px;
  margin: 0 auto 12px;
}

.week-label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  justify-content: center;
  gap: 4px 10px;
  min-height: 48px;
  font-size: 18px;
  text-align: center;
}

.week-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  max-width: 560px;
  margin: 0 auto 14px;
}

.strip-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 2px 8px;
  border: 2px solid transparent;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.5);
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  transition:
    transform 0.25s var(--spring),
    background 0.25s;
}

.strip-day:active {
  transform: scale(0.92);
}

.strip-day.is-today {
  border-color: var(--grape);
}

.strip-day.on {
  background: var(--white);
  box-shadow: var(--shadow-m);
  transform: translateY(-3px);
}

.strip-day.is-full {
  background: linear-gradient(180deg, #fff8dc, rgba(255, 255, 255, 0.8));
}

.strip-name {
  font-size: 12px;
  color: var(--ink-soft);
  text-transform: uppercase;
}

.strip-progress {
  width: 70%;
  height: 4px;
  border-radius: 2px;
  background: rgba(45, 42, 74, 0.08);
  overflow: hidden;
}

.strip-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--leaf), var(--teal));
}

.strip-star {
  color: #ffb300;
  font-size: 14px;
  line-height: 4px;
}

/* One day at a time, with a peek at the next one. */
.week-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  max-width: 1000px;
  margin: 0 auto;
  touch-action: pan-y;
}

.week-grid.solo {
  grid-template-columns: minmax(0, 660px);
  justify-content: center;
}

.day.peek {
  opacity: 0.55;
  transform: scale(0.96);
  transform-origin: top left;
  cursor: pointer;
}

.day.peek:hover {
  opacity: 0.75;
}

.day {
  border-radius: 26px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.8);
  min-height: 300px;
  transition: background 0.4s;
}

.day.is-past {
  opacity: 0.78;
}

.day.is-today {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--grape);
  box-shadow:
    0 0 0 5px rgba(142, 108, 255, 0.18),
    var(--shadow-m);
}

.day.is-full {
  background: linear-gradient(180deg, #fff8dc, rgba(255, 255, 255, 0.8));
}

.day-head {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 6px 8px;
  flex-wrap: wrap;
}

.day-name {
  font-size: 15px;
  color: var(--ink-soft);
  text-transform: uppercase;
}

.day-num {
  font-size: 24px;
  font-weight: 900;
}

.today-pill {
  margin-left: auto;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--grape);
  color: var(--white);
  font-size: 12px;
  animation: bob 2.2s ease-in-out infinite;
}

@keyframes bob {
  50% {
    transform: translateY(-3px);
  }
}

.full-star {
  margin-left: auto;
  color: #ffb300;
  font-size: 22px;
  animation: glow 1.8s ease-in-out infinite;
  border-radius: 50%;
}

.day-progress {
  height: 6px;
  margin: 0 6px 8px;
  border-radius: 3px;
  background: rgba(45, 42, 74, 0.08);
  overflow: hidden;
}

.day-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--leaf), var(--teal));
  border-radius: 3px;
  transition: width 0.8s var(--spring);
}

.day-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.task-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "art coin"
    "name name";
  align-items: start;
  gap: 4px 6px;
  padding: 8px 10px 10px;
  border-radius: 20px;
  background: var(--white);
  text-align: left;
  box-shadow:
    0 4px 0 rgba(45, 42, 74, 0.1),
    0 6px 14px rgba(45, 42, 74, 0.08);
  border: 2px solid transparent;
  transition:
    transform 0.2s var(--spring),
    box-shadow 0.2s;
}

.task-card.tappable {
  background: linear-gradient(160deg, #fff, #fff7ec);
  border-color: rgba(255, 200, 61, 0.55);
  animation: card-breathe 3.2s ease-in-out infinite;
}

.task-card.tappable:nth-child(2n) {
  animation-delay: -1.1s;
}

.task-card.tappable:nth-child(3n) {
  animation-delay: -2.2s;
}

/* transform only: an animated shadow repaints every open card every frame */
@keyframes card-breathe {
  50% {
    transform: translateY(-2px);
  }
}

.task-card.tappable:active {
  transform: scale(0.95);
}

.task-card.popping {
  animation: none;
  transform: scale(1.12);
  box-shadow:
    0 0 0 6px rgba(255, 200, 61, 0.6),
    0 16px 30px rgba(255, 170, 60, 0.4);
  z-index: 10;
}

.task-card.locked {
  cursor: default;
}

.task-art {
  grid-area: art;
  width: 54px;
  height: 54px;
}

.task-name {
  grid-area: name;
  font-size: 15px;
  line-height: 1.15;
  font-weight: 800;
  hyphens: auto;
  -webkit-hyphens: auto;
  overflow-wrap: break-word;
}

.task-name small {
  display: block;
  color: var(--ink-soft);
  font-size: 12px;
}

.task-card .coin {
  grid-area: coin;
  justify-self: end;
  font-size: 15px;
  min-width: 40px;
  padding: 2px 8px;
}

.task-card.done {
  background: #f0fbf3;
  opacity: 0.85;
  transform: scale(0.94);
  box-shadow: none;
  border-color: rgba(91, 209, 107, 0.4);
}

.task-card.done .task-art {
  filter: saturate(0.5);
  opacity: 0.6;
}

.task-card.done .coin {
  background: #d8f5df;
  color: #2f8a45;
  box-shadow: none;
}

.done-check {
  position: absolute;
  top: -6px;
  left: -6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--leaf);
  color: var(--white);
  font-size: 16px;
  box-shadow: 0 2px 0 #3faf52;
}

.undo-btn {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #ffe3e6;
  color: #d43b4c;
}

/* play sessions and shopping lists open on tap; holding the check marks them done early */
.task-card.opens .task-art {
  box-shadow: 0 0 0 3px var(--child, var(--grape));
  border-radius: 14px;
}

.task-card.opens .task-name {
  padding-right: 38px;
}

.quick-done {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #d9f7e8;
  color: #12936e;
}

/* press and hold to tick off: the fill rises while the finger stays down */
.task-card.tappable,
.task-card.fixable,
.quick-done {
  isolation: isolate;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.task-card.tappable.holding,
.task-card.fixable.holding {
  animation: none;
  transform: scale(1.06);
  transition: transform 0.7s ease-in;
}

/* in parent mode, open cards of the last days can still be ticked off */
.task-card.fixable {
  border: 2px dashed var(--grape);
}

.hold-fill {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(0deg, rgba(91, 209, 107, 0.5), rgba(255, 200, 61, 0.35));
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.25s ease-out;
  pointer-events: none;
}

.quick-done > .hold-fill {
  background: #7fe0a0;
}

.holding > .hold-fill {
  transform: scaleY(1);
  transition: transform 0.7s linear;
}

/* full: lift the finger to finish */
.task-card.holding.hold-ready,
.quick-done.holding.hold-ready {
  box-shadow:
    0 0 0 4px rgba(91, 209, 107, 0.7),
    0 12px 26px rgba(91, 209, 107, 0.35);
  animation: hold-ready 0.45s ease-in-out infinite;
}

@keyframes hold-ready {
  25% {
    rotate: -2deg;
  }
  75% {
    rotate: 2deg;
  }
}

.hold-hint {
  position: absolute;
  left: 50%;
  bottom: 8px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  pointer-events: none;
  animation: hold-hint 1.6s ease forwards;
}

@keyframes hold-hint {
  0% {
    opacity: 0;
    transform: translate(-50%, 6px) scale(0.8);
  }
  12%,
  80% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -4px);
  }
}

.info-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 18px;
  background: repeating-linear-gradient(-45deg, #f2f5ff 0 8px, #eaf0fc 8px 16px);
  border: 2px dashed rgba(61, 181, 255, 0.4);
  color: #3a4f78;
}

.info-art {
  width: 36px;
  height: 36px;
  flex: none;
  opacity: 0.9;
}

.info-text {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  min-width: 0;
}

.info-text {
  hyphens: auto;
  -webkit-hyphens: auto;
}

.info-text span {
  font-size: 12px;
  font-weight: 700;
  color: #5d6f96;
  overflow-wrap: break-word;
}

/* celebrations */
.modal-celebrate {
  position: relative;
  overflow: hidden;
  text-align: center;
  isolation: isolate;
  width: min(460px, 100%);
}

.celebrate {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.celebrate h2 {
  font-size: 32px;
  color: var(--grape);
}

.grow-stage {
  width: 220px;
  height: 220px;
}

.grow-img {
  width: 100%;
  height: 100%;
}

.grow-bonus {
  font-size: 40px;
  font-weight: 900;
  color: #ffb300;
  -webkit-text-stroke: 2px #fff;
  paint-order: stroke fill;
}

.sticker-flip {
  width: 220px;
  height: 220px;
  perspective: 900px;
}

.sticker-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  animation: flip-in 1.4s 0.3s var(--spring) both;
}

@keyframes flip-in {
  0% {
    transform: rotateY(0) scale(0.4);
  }
  40% {
    transform: rotateY(0) scale(1);
  }
  100% {
    transform: rotateY(540deg) scale(1);
  }
}

.sticker-back,
.sticker-front {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 40px;
  display: grid;
  place-items: center;
}

.sticker-back {
  background: linear-gradient(135deg, var(--grape), var(--berry));
  color: var(--white);
  font-size: 100px;
  font-weight: 900;
}

.sticker-front {
  transform: rotateY(180deg);
  overflow: hidden;
}

.sticker-front::after,
.sticker-big::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.75) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: shine 2.6s 1.7s ease-in-out infinite;
}

@keyframes shine {
  60%,
  100% {
    transform: translateX(120%);
  }
}

.sticker-big {
  position: relative;
  width: 220px;
  height: 220px;
  overflow: hidden;
  border-radius: 40px;
  animation: pop-in 0.5s var(--spring) both;
}

.sticker-name {
  font-size: 26px;
  font-weight: 900;
}

.rarity-tag {
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 14px;
  background: #e8f6ff;
  color: #2f8fd6;
}

.rarity-tag.rare {
  background: linear-gradient(90deg, #efe8ff, #ffe4f1);
  color: var(--grape);
}

.rarity-tag.legendary {
  background: linear-gradient(90deg, #ffe07a, #ffc83d, #ffe07a);
  color: #7a4a00;
  animation: glow 1.6s ease-in-out infinite;
}

.reward-line {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 16px;
  background: #fff4de;
  font-size: 18px;
  margin: 4px 0;
}

.plant-modal {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.plant-big {
  width: 240px;
  height: 240px;
  animation: sway 4s ease-in-out infinite;
  transform-origin: 50% 90%;
}

.stage-dots {
  display: flex;
  gap: 10px;
}

.stage-dots span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(45, 42, 74, 0.1);
}

.stage-dots span.on {
  background: var(--leaf);
  box-shadow: 0 0 0 4px rgba(91, 209, 107, 0.25);
}

.garden {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  padding: 10px;
  border-radius: 20px;
  background: linear-gradient(180deg, #e8fbe9, #c9f0cf);
}

.garden-slot {
  width: 56px;
  height: 56px;
  animation: sway 3s ease-in-out infinite;
  animation-delay: calc(var(--i) * -0.4s);
}

/* ================= play session ================= */
.toddler {
  min-height: calc(100dvh - var(--topbar-h) - 40px);
  position: relative;
}

.toddler-hello {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 10px 0 24px;
}

.toddler-hello h2 {
  font-size: clamp(28px, 4vw, 42px);
  color: var(--child);
}

.hello-avatar {
  width: 96px;
  height: 96px;
  animation: float 3.5s ease-in-out infinite;
}

.bubbles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(16px, 3vw, 32px);
  max-width: 1100px;
  margin: 0 auto;
}

.bubble {
  position: relative;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.7), transparent 30%),
    radial-gradient(circle, color-mix(in srgb, var(--c) 55%, #fff), var(--c));
  box-shadow:
    0 8px 0 color-mix(in srgb, var(--c) 65%, #000),
    0 26px 44px color-mix(in srgb, var(--c) 40%, transparent);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--white);
  animation:
    pop-in 0.6s var(--spring) both,
    float 4.5s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.12s), calc(var(--i) * -1.2s);
}

.bubble:active {
  transform: scale(0.93);
}

.bubble.finished {
  filter: saturate(0.6);
  opacity: 0.85;
}

.bubble-cards {
  position: relative;
  width: 70%;
  height: 46%;
}

.bubble-cards span {
  position: absolute;
  top: 0;
  left: calc(var(--j) * 22%);
  width: 46%;
  aspect-ratio: 1;
  border-radius: 22px;
  background: var(--white);
  padding: 6px;
  box-shadow: var(--shadow-s);
  transform: rotate(calc((var(--j) - 1.5) * 8deg));
}

.bubble-name {
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 900;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.15);
}

.bubble-time {
  font-size: 16px;
  opacity: 0.9;
}

.bubble-star {
  position: absolute;
  top: 8%;
  right: 12%;
  font-size: 48px;
  color: #fff6c9;
  animation: glow 1.8s ease-in-out infinite;
}

.toddler-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-top: 40px;
}

.big-snail {
  width: min(360px, 80vw);
  height: auto;
}

.play-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.timer-track {
  position: relative;
  flex: 1;
  height: 70px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow:
    inset 0 3px 8px rgba(45, 42, 74, 0.12),
    var(--shadow-s);
}

.timer-fill {
  position: absolute;
  right: 0;
  top: 10px;
  bottom: 10px;
  border-radius: 999px;
  margin-right: 10px;
  max-width: calc(100% - 20px);
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0.3) 0 14px,
    transparent 14px 28px
  ) !important;
  background-color: var(--sky);
  animation: stripes 1.2s linear infinite;
  transition: width 0.4s linear;
}

.timer-snail {
  position: absolute;
  bottom: 4px;
  width: 64px;
  height: 64px;
  z-index: 2;
  filter: drop-shadow(0 3px 2px rgba(45, 42, 74, 0.2));
}

.timer-house {
  position: absolute;
  right: -10px;
  bottom: 2px;
  width: 76px;
  height: 76px;
  z-index: 1;
}

.toddler-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(150px, 22vw, 230px), 1fr));
  gap: clamp(14px, 2.5vw, 28px);
}

.toddler-card {
  position: relative;
  aspect-ratio: 0.9;
  border-radius: 40px;
  background: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px;
  gap: 8px;
  box-shadow:
    0 8px 0 color-mix(in srgb, var(--child) 40%, #fff),
    0 18px 34px rgba(45, 42, 74, 0.12);
  border: 4px solid color-mix(in srgb, var(--child) 25%, #fff);
  animation: pop-in 0.5s var(--spring) both;
  touch-action: manipulation;
}

.toddler-card:nth-child(1) {
  animation-delay: 0.05s;
}
.toddler-card:nth-child(2) {
  animation-delay: 0.12s;
}
.toddler-card:nth-child(3) {
  animation-delay: 0.19s;
}
.toddler-card:nth-child(4) {
  animation-delay: 0.26s;
}
.toddler-card:nth-child(5) {
  animation-delay: 0.33s;
}
.toddler-card:nth-child(6) {
  animation-delay: 0.4s;
}

.toddler-card:active {
  transform: scale(0.94);
}

.toddler-card.popping {
  animation: jelly 0.45s var(--spring) both;
  z-index: 10;
}

@keyframes jelly {
  0% {
    transform: scale(1);
  }
  30% {
    transform: scale(1.25, 0.85);
  }
  50% {
    transform: scale(0.9, 1.15);
  }
  70% {
    transform: scale(1.1, 0.95);
  }
  100% {
    transform: scale(1.15);
  }
}

.toddler-art {
  width: 80%;
  flex: 1;
  min-height: 0;
}

.toddler-name {
  font-size: clamp(16px, 2vw, 22px);
  color: var(--ink-soft);
}

.toddler-party {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding-top: 30px;
  overflow: hidden;
  isolation: isolate;
  min-height: 70dvh;
}

.toddler-party h2 {
  font-size: clamp(40px, 7vw, 72px);
  color: var(--child);
}

.party-avatar {
  width: min(280px, 60vw);
  height: auto;
  animation: dance 0.9s ease-in-out infinite;
}

@keyframes dance {
  0%,
  100% {
    transform: rotate(-6deg) translateY(0);
  }
  50% {
    transform: rotate(6deg) translateY(-14px);
  }
}

.party-stars {
  font-size: 48px;
  color: #ffb300;
  letter-spacing: 12px;
  animation: glow 1.4s ease-in-out infinite;
}

.night {
  position: fixed;
  inset: 0;
  z-index: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: #fff;
  background: radial-gradient(circle at 50% 30%, #4f5fb8, #232a5c 70%);
  animation: fade-in 1.4s ease both;
}

.night h2 {
  font-size: clamp(32px, 5vw, 52px);
}

.night-stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(2px 2px at 10% 20%, #fff, transparent),
    radial-gradient(2px 2px at 30% 70%, #fff, transparent),
    radial-gradient(3px 3px at 50% 15%, #fff6c9, transparent),
    radial-gradient(2px 2px at 70% 40%, #fff, transparent),
    radial-gradient(3px 3px at 85% 75%, #fff6c9, transparent),
    radial-gradient(2px 2px at 20% 85%, #fff, transparent),
    radial-gradient(2px 2px at 90% 10%, #fff, transparent);
  animation: blink 3s ease-in-out infinite;
}

.night-snail {
  width: min(320px, 70vw);
  height: auto;
  position: relative;
}

/* ================= sticker album ================= */
.album {
  max-width: 1100px;
  margin: 0 auto;
}

.album-head {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 22px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.album-head .goal-track {
  flex: 1;
  min-width: 160px;
}

.album-progress {
  font-size: 22px;
}

.album-page {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 16px;
  padding: 22px;
  border-radius: var(--radius-l);
  background:
    radial-gradient(circle at 1px 1px, rgba(45, 42, 74, 0.08) 1px, transparent 0) 0 0 / 22px 22px,
    #fffaf0;
  box-shadow:
    var(--shadow-m),
    inset 0 0 0 10px #fff;
}

.slot {
  position: relative;
  aspect-ratio: 1;
  border-radius: 26px;
  padding: 8px;
  animation: pop-in 0.5s var(--spring) both;
  animation-delay: calc(var(--i) * 0.03s);
}

.slot.empty {
  opacity: 0.6;
}

.slot.owned {
  background: rgba(255, 255, 255, 0.6);
  transition: transform 0.25s var(--spring);
}

.slot.owned:active {
  transform: scale(0.92) rotate(-3deg);
}

.slot.owned.rarity-rare {
  background: radial-gradient(circle, rgba(232, 67, 147, 0.12), rgba(142, 108, 255, 0.12));
}

.slot.owned.rarity-legendary {
  background: radial-gradient(circle, rgba(255, 200, 61, 0.35), rgba(255, 200, 61, 0.05));
  animation:
    pop-in 0.5s var(--spring) both,
    glow 2.4s ease-in-out infinite;
}

.slot-count {
  position: absolute;
  bottom: 4px;
  right: 6px;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--grape);
  color: var(--white);
  font-size: 13px;
}

/* ================= shopping ================= */
.shop {
  max-width: 720px;
  margin: 0 auto;
}

.shop-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  margin-bottom: 12px;
  position: sticky;
  top: calc(var(--topbar-h) + env(safe-area-inset-top) + 8px);
  z-index: 20;
}

.shop-title {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.shop-title h2 {
  font-size: 22px;
}

.shop-head .goal-track {
  flex: 1;
  min-width: 60px;
}

.cart {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  font-size: 30px;
  color: var(--white);
  background: linear-gradient(135deg, var(--tangerine), var(--coral));
  box-shadow: 0 4px 0 #c94352;
  flex: none;
}

.cart-count {
  position: absolute;
  bottom: -8px;
  right: -8px;
  padding: 1px 7px;
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  font-size: 12px;
  box-shadow: var(--shadow-s);
}

.shop-hint {
  text-align: center;
  color: var(--ink-soft);
  margin: 4px 0 12px;
}

.shop-deck {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.shop-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px 12px 12px;
  border-radius: 28px;
  background: var(--white);
  box-shadow:
    0 5px 0 rgba(45, 42, 74, 0.08),
    0 10px 22px rgba(45, 42, 74, 0.08);
  touch-action: pan-y;
  cursor: grab;
  overflow: hidden;
  animation: pop-in 0.45s var(--spring) both;
}

.shop-card.dragging {
  transition: none;
  box-shadow: var(--shadow-l);
  z-index: 5;
}

.swipe-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(91, 209, 107, 0.25), rgba(91, 209, 107, 0));
  opacity: var(--glow, 0);
}

.shop-art {
  width: 72px;
  height: 72px;
  flex: none;
}

.shop-name {
  flex: 1;
  font-size: 22px;
  font-weight: 900;
}

.shop-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 30px;
  animation: pop-in 0.6s var(--spring) both;
}

.shop-done-cart {
  width: 120px;
  height: 120px;
  border-radius: 40px;
  display: grid;
  place-items: center;
  font-size: 64px;
  color: var(--white);
  background: linear-gradient(135deg, var(--leaf), var(--teal));
  box-shadow: 0 6px 0 #179c7f;
  animation: dance 1.2s ease-in-out infinite;
}

.shop-tray {
  margin-top: 24px;
}

.shop-tray h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 17px;
  margin-bottom: 10px;
}

.tray-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tray-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  background: #eafaf0;
  color: #2f8a45;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  font-size: 15px;
  animation: pop-in 0.4s var(--spring) both;
}

.tray-art {
  width: 30px;
  height: 30px;
}

.shop-editor {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.shop-editor form {
  flex-wrap: nowrap;
  align-items: stretch;
}

.lib-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 8px;
  max-height: 300px;
  overflow: auto;
  padding: 6px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.6);
}

.lib-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  border-radius: 16px;
  background: var(--white);
  font-size: 12px;
  box-shadow: var(--shadow-s);
}

.lib-tile img,
.lib-tile .art {
  width: 52px;
  height: 52px;
}

/* ================= reports ================= */
.report-pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding-top: 30px;
}

.pick-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.pick-child {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 30px;
  border-radius: 34px;
  background: var(--white);
  text-decoration: none;
  font-size: 24px;
  font-weight: 900;
  color: var(--child);
  box-shadow:
    0 6px 0 color-mix(in srgb, var(--child) 40%, #fff),
    var(--shadow-m);
}

.pick-child img {
  width: 140px;
  height: 140px;
}

.pick-row.small {
  gap: 10px;
  justify-content: flex-start;
}

.pick-child.small {
  flex-direction: row;
  padding: 6px 16px 6px 6px;
  font-size: 17px;
  border-radius: 999px;
  opacity: 0.6;
  box-shadow: var(--shadow-s);
}

.pick-child.small img {
  width: 44px;
  height: 44px;
}

.pick-child.small.on {
  opacity: 1;
  box-shadow:
    0 0 0 3px var(--child),
    var(--shadow-s);
}

.report-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto 16px;
}

.report-body {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.stat-tile {
  position: relative;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  border-radius: 24px;
}

.stat-label {
  font-size: 13px;
  color: var(--ink-soft);
}

.stat-value {
  font-size: 34px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.tile-plant {
  position: absolute;
  right: 8px;
  bottom: 6px;
  width: 54px;
  height: 54px;
}

.report-panel {
  padding: 18px 20px;
}

.report-panel h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.day-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.day-row {
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
}

.day-row summary {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr 0.6fr 30px 1fr;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  cursor: pointer;
  list-style: none;
}

.day-row summary::-webkit-details-marker {
  display: none;
}

.dr-pts {
  color: var(--grape);
  font-weight: 900;
}

.dr-tasks {
  color: var(--ink-soft);
}

.dr-star {
  color: #ffb300;
}

.dr-stickers {
  display: flex;
  gap: 2px;
}

.dr-sticker {
  width: 26px;
  height: 26px;
}

.dr-items {
  list-style: none;
  margin: 0;
  padding: 0 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dr-items li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--ink-soft);
}

.dr-items li > span:first-of-type {
  flex: 1;
}

.dr-items li.done {
  color: var(--ink);
}

.dr-items li.info {
  font-style: italic;
}

.dr-art {
  width: 26px;
  height: 26px;
}

.dr-check {
  color: #2f9e57;
  display: flex;
  align-items: center;
  gap: 2px;
}

/* ================= config ================= */
.config {
  max-width: 1500px;
  margin: 0 auto;
}

.config-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.config-body > * {
  margin: 0;
}

.planner-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.planner-toolbar .row {
  align-items: center;
}

.planner {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.library {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: sticky;
  top: calc(var(--topbar-h) + env(safe-area-inset-top) + 12px);
  max-height: calc(100dvh - var(--topbar-h) - 40px);
  border-radius: 26px;
}

.library h3 {
  font-size: 17px;
}

.lib-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  min-height: 0;
  flex: 1;
  padding: 2px;
}

.lib-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 6px;
  border-radius: 14px;
  background: var(--white);
  box-shadow: var(--shadow-s);
  cursor: grab;
  touch-action: pan-y;
  font-size: 14px;
}

.lib-item.kind-info {
  background: #f2f5ff;
}

.lib-art {
  width: 36px;
  height: 36px;
  flex: none;
}

.lib-name {
  flex: 1;
  min-width: 0;
}

.planner-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(132px, 1fr));
  gap: 8px;
  overflow-x: auto;
  /* room for today's 3px ring, which the scroll container would clip */
  padding: 4px 4px 8px;
}

.plan-day {
  border-radius: 22px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.7);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.plan-day.locked {
  opacity: 0.55;
}

.plan-day.is-today {
  box-shadow: 0 0 0 3px var(--grape);
}

.plan-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 2px 4px;
}

.plan-items {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 120px;
  border-radius: 14px;
  padding: 2px;
  flex: 1;
}

.plan-item {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 2px 6px;
  padding: 5px 6px;
  border-radius: 12px;
  background: var(--white);
  box-shadow: var(--shadow-s);
  font-size: 13px;
  cursor: pointer;
}

.plan-item .plan-name {
  grid-column: 1 / -1;
  grid-row: 2;
  padding-left: 2px;
}

.plan-item .coin {
  justify-self: end;
}

.plan-item.kind-info {
  background: #f2f5ff;
  border: 1px dashed rgba(61, 181, 255, 0.5);
}

.plan-item.done {
  background: #eafaf0;
}

.drag-handle {
  color: var(--ink-faint);
  cursor: grab;
  touch-action: none;
  padding: 4px 0;
}

.plan-art {
  width: 28px;
  height: 28px;
  flex: none;
}

.plan-name {
  min-width: 0;
  line-height: 1.15;
  hyphens: auto;
  -webkit-hyphens: auto;
  overflow-wrap: break-word;
}

.plan-name small {
  display: block;
  color: var(--ink-soft);
  font-size: 11px;
}

.x-btn {
  color: var(--ink-faint);
  font-size: 14px;
  padding: 2px;
}

.plan-sum {
  font-size: 12px;
  color: var(--ink-soft);
  text-align: right;
  padding: 0 4px;
}

.day-pick {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}

.day-pick .btn.on {
  background: var(--grape);
  color: var(--white);
  box-shadow: 0 3px 0 #6a4fd6;
}

.edit-art {
  width: 56px;
  height: 56px;
}

.icon-pick {
  height: 54px;
  border-radius: 14px;
  border: 2px dashed rgba(45, 42, 74, 0.2);
  background: var(--white);
  display: grid;
  place-items: center;
  padding: 4px 12px;
}

.icon-pick img {
  width: 44px;
  height: 44px;
}

.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 6px;
  max-height: 60dvh;
  overflow: auto;
}

.icon-cell {
  aspect-ratio: 1;
  padding: 6px;
  border-radius: 14px;
  background: var(--white);
  box-shadow: var(--shadow-s);
}

.icon-cell.none {
  font-size: 11px;
}

.session-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 1000px;
}

.session-row {
  display: grid;
  grid-template-columns: 22px 1fr auto auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow-s);
  text-align: left;
}

.session-row.on {
  box-shadow: 0 0 0 3px var(--c);
}

.session-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--c);
  flex: none;
}

.session-thumbs {
  display: flex;
}

.session-thumbs .art {
  width: 32px;
  height: 32px;
  margin-left: -6px;
}

.session-editor {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-top: 6px solid var(--c);
}

.session-editor .library {
  position: static;
  max-height: 340px;
}

.session-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 60px;
}

.s-card {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px 6px 6px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow-s);
  animation: pop-in 0.35s var(--spring) both;
}

.s-card .art {
  width: 40px;
  height: 40px;
}

.s-card .x {
  color: var(--ink-faint);
}

.swatches {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.swatch {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  box-shadow: var(--shadow-s);
}

.swatch.on {
  box-shadow:
    0 0 0 3px #fff,
    0 0 0 6px var(--ink);
}

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

.day-toggles button {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--white);
  box-shadow: var(--shadow-s);
  color: var(--ink-soft);
}

.day-toggles button.on {
  background: var(--grape);
  color: var(--white);
}

.feed-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 22px;
}

.feed-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

.mini-avatar {
  width: 44px;
  height: 44px;
  flex: none;
}

.card-rows {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

.card-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 8px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow-s);
  text-align: left;
}

.card-row > span:nth-child(2) {
  flex: 1;
}

/* ================= responsive ================= */
@media (max-width: 1100px) {
  .wk-head {
    grid-template-columns: auto 1fr auto auto;
  }

  .wk-goal {
    grid-column: 1 / -1;
    order: 5;
  }

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

  .planner > .library {
    position: static;
    max-height: none;
  }

  .planner > .library .lib-list {
    max-height: min(50dvh, 380px);
  }
}

@media (max-width: 820px) {
  .hub-top,
  .hub-children,
  .hub-bottom {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  :root {
    --topbar-h: 58px;
  }

  .tb-btn {
    width: 42px;
    height: 42px;
  }

  .lang-switch button {
    padding: 6px 7px;
    font-size: 12px;
  }

  .wk-head {
    grid-template-columns: 1fr auto auto;
    gap: 10px;
  }

  .wk-who {
    display: none;
  }

  .wk-counters {
    grid-column: 1 / -1;
    order: 4;
  }

  .counter {
    min-width: 0;
    padding: 6px 4px;
  }

  .counter .count {
    font-size: 24px;
  }

  .wk-goal {
    grid-column: 1 / 2;
    order: 0;
  }

  .wk-plant,
  .wk-album {
    width: 64px;
    height: 64px;
  }

  .wk-plant-img {
    width: 58px;
    height: 58px;
  }

  .album-img {
    width: 30px;
    height: 30px;
  }

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

  .day.peek {
    display: none;
  }

  .child-card {
    border-radius: 32px;
  }

  .ring {
    position: absolute;
    top: 14px;
    right: 14px;
    --size: 62px;
    font-size: 15px;
  }

  .bubbles {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .bubble-name {
    font-size: 16px;
  }

  .toddler-cards {
    grid-template-columns: 1fr 1fr;
  }

  .timer-track {
    height: 56px;
  }

  .timer-snail {
    width: 50px;
    height: 50px;
  }

  .timer-house {
    width: 60px;
    height: 60px;
  }

  .session-row {
    grid-template-columns: 22px 1fr;
  }

  .session-row > :nth-child(n + 3) {
    grid-column: 2;
  }

  .day-row summary {
    grid-template-columns: 1.3fr 0.7fr 0.5fr 24px;
  }

  .dr-stickers {
    display: none;
  }

  .shop-name {
    font-size: 19px;
  }

  .shop-art {
    width: 58px;
    height: 58px;
  }
}

@media (max-width: 640px) {
  .shop-head {
    flex-wrap: wrap;
  }

  .shop-title {
    flex: 1;
  }

  .shop-head .goal-track {
    order: 5;
    flex-basis: 100%;
    height: 14px;
  }
}

/* ================= children settings ================= */
.child-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  border-left: 8px solid var(--child, var(--grape));
}

.child-row .grow {
  flex: 1 1 260px;
}

.child-avatar-btn {
  position: relative;
  width: 104px;
  height: 104px;
  flex: none;
  border-radius: 50%;
  transition: transform 0.2s var(--spring);
}

.child-avatar-btn:active {
  transform: scale(0.92);
}

.avatar-edit {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--grape);
  color: var(--white);
  box-shadow: 0 3px 0 #6a4fd6;
}

.mode-tag {
  align-self: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--child, var(--grape)) 15%, #fff);
  font-size: 14px;
  white-space: nowrap;
}

.new-child {
  border-left-style: dashed;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 12px;
}

.preset-cell {
  aspect-ratio: 1;
  padding: 4px;
  border-radius: 50%;
  transition: transform 0.2s var(--spring);
  animation: pop-in 0.4s var(--spring) both;
}

.preset-cell:active {
  transform: scale(0.9);
}

.preset-cell.on {
  box-shadow: 0 0 0 4px var(--grape);
}

.photo-start {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 30px 0;
}

.photo-pick {
  cursor: pointer;
}

.crop {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
}

.crop-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(300px, 100%);
}

.crop-view {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 20px;
  background: #eee;
  touch-action: none;
  cursor: grab;
}

.crop-preview {
  width: 100%;
  aspect-ratio: 1;
}

.crop-result {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 6px solid #fff;
  box-shadow:
    0 0 0 3px rgba(45, 42, 74, 0.85),
    var(--shadow-m);
}

/* ---------- feedback ---------- */

.feedback-text {
  min-height: 120px;
  resize: vertical;
  font: inherit;
}

.feedback-preview img,
.feedback-shot img {
  display: block;
  max-width: 100%;
  max-height: 220px;
  border-radius: 14px;
  box-shadow: var(--shadow-s);
}

.feedback-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 22px;
}

.feedback-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.feedback-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.chip.feedback-bug {
  background: var(--berry);
  color: var(--white);
}

.chip.feedback-idea {
  background: var(--grape);
  color: var(--white);
}

.chip.feedback-card {
  background: var(--teal);
  color: var(--white);
}

.about {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.about h3 {
  margin: 12px 0 0;
}

.about-hero {
  padding: 28px 24px;
  text-align: center;
}

.about-hero h2 {
  margin: 6px 0 0;
  font-size: 40px;
  color: var(--grape);
}

.about-hero p {
  max-width: 620px;
  margin: 10px auto 0;
  line-height: 1.5;
}

.about-tagline {
  font-size: 20px;
  font-weight: 900;
}

.about-icon {
  display: block;
  margin: 0 auto;
  width: 96px;
  height: 96px;
  filter: drop-shadow(0 10px 18px rgba(142, 108, 255, 0.35));
  animation: float 4s ease-in-out infinite;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}

.about-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 14px;
  text-align: center;
  border-radius: var(--radius-m);
  animation: about-pop 0.5s var(--spring) both;
  animation-delay: calc(var(--i) * 60ms);
}

.about-tile p {
  margin: 0;
  line-height: 1.4;
}

.about-art {
  width: 72px;
  height: 72px;
}

@keyframes about-pop {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.92);
  }
}

.about > .btn {
  align-self: center;
}

.facts {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.fact-card {
  width: 100%;
  min-height: 260px;
  padding: 28px clamp(20px, 5vw, 48px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  text-align: center;
  touch-action: pan-y;
  user-select: none;
}

.fact-card.from-right {
  animation: fact-in-right 0.35s var(--spring);
}

.fact-card.from-left {
  animation: fact-in-left 0.35s var(--spring);
}

@keyframes fact-in-right {
  from {
    opacity: 0;
    transform: translateX(40px) rotate(1deg);
  }
}

@keyframes fact-in-left {
  from {
    opacity: 0;
    transform: translateX(-40px) rotate(-1deg);
  }
}

.fact-big {
  margin: 0;
  font-size: clamp(22px, 3.4vw, 32px);
  font-weight: 800;
  line-height: 1.35;
}

.fact-controls {
  display: flex;
  gap: 18px;
}

.fact-nav {
  width: 68px;
  height: 68px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 30px;
  color: var(--white);
  background: var(--grape);
  box-shadow: 0 5px 0 #6a4fd6;
  cursor: pointer;
  transition: transform 0.15s var(--spring);
}

.fact-nav:nth-child(2) {
  background: var(--sky);
  box-shadow: 0 5px 0 color-mix(in srgb, var(--sky) 70%, #000);
}

.fact-nav:active {
  transform: translateY(5px);
  box-shadow: none;
}

/* ================= setup wizard & tour ================= */
.setup {
  max-width: 640px;
  margin: 0 auto;
}

.setup-card {
  padding: clamp(20px, 4vw, 32px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.setup-card h2,
.setup-card p {
  margin: 0;
}

.setup-in {
  animation: about-pop 0.4s var(--spring);
}

.setup-avatar {
  align-self: center;
  width: 120px;
  height: 120px;
}

.setup-chip {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px 6px 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--child) 18%, var(--white));
  font-weight: 900;
}

.setup-chip .art {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.setup-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.setup-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 14px;
  border: 0;
  border-radius: var(--radius-m);
  background: var(--white);
  box-shadow:
    0 4px 0 #e4ddf7,
    var(--shadow-m);
  text-align: center;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: transform 0.2s var(--spring);
}

.setup-group:active {
  transform: translateY(4px);
}

.setup-group-art {
  width: 72px;
  height: 72px;
}

.setup-lang {
  transition:
    transform 0.2s var(--spring),
    box-shadow 0.2s;
}

.setup-lang-code {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(142, 108, 255, 0.12);
  color: var(--grape);
  font-size: 26px;
  font-weight: 900;
  transition:
    background 0.2s,
    color 0.2s,
    transform 0.3s var(--spring);
}

.setup-lang.on {
  box-shadow:
    0 4px 0 var(--grape),
    0 0 0 3px var(--grape),
    var(--shadow-m);
}

.setup-lang.on .setup-lang-code {
  background: var(--grape);
  color: var(--white);
  transform: scale(1.08);
}

.tour-modal {
  max-width: 480px;
}

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

.tour-slide {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
}

.tour-slide h2,
.tour-slide p {
  margin: 0;
}

.tour-slide p {
  line-height: 1.5;
}

.tour-in {
  animation: fact-in-right 0.35s var(--spring);
}

.tour-art {
  width: 112px;
  height: 112px;
}

.tour-icon {
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 56px;
  color: var(--white);
  background: var(--grape);
  box-shadow: 0 6px 0 #6a4fd6;
}

.tour-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.tour-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e4ddf7;
  transition: all 0.25s var(--spring);
}

.tour-dots span.on {
  width: 26px;
  border-radius: 6px;
  background: var(--grape);
}

.shop-lists {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.legal h2 {
  margin: 0 0 4px;
  color: var(--grape);
}

.legal h3 {
  margin: 22px 0 6px;
  font-size: 17px;
}

.legal p {
  margin: 6px 0;
}

.legal-credits {
  padding-left: 20px;
}

.legal-credits li {
  margin: 6px 0;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  margin: 16px 0 4px;
  font-size: 14px;
  font-weight: 700;
}

.legal-links a {
  color: inherit;
  opacity: 0.7;
}
