/* ——— Done for today (js/screens/done.js) ———
   A warm goodnight card: the buddy beside the palace (or the parked train)
   under a moon and a few stars, what the child did today, then "Switch
   player" and the grown-ups' "+10 minutes". Palace colors by default;
   Speedy Town's are at the bottom, under html[data-theme='town']. */

.view-doneToday { display: grid; place-items: center; min-height: calc(100dvh - 60px); padding: 12px 0; }
.dn-wrap { width: 100%; max-width: 560px; display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; }

.dn-card {
  position: relative;
  width: 100%;
  padding: 92px 22px 26px;
  border: 6px solid #fff;
  border-radius: 40px;
  background: linear-gradient(180deg, #e9ddff 0%, #f6ecff 45%, #ffe6f2 100%);
  box-shadow: 0 10px 0 #e2cdf3, var(--shadow);
  animation: pop-in 0.6s var(--bounce) backwards;
}

/* The night sky: a moon that rocks gently and stars that twinkle in turn. */
.dn-sky { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; }
.dn-moon { position: absolute; top: 14px; right: 24px; font-size: 46px; animation: dn-rock 5s ease-in-out infinite; }
.dn-star {
  position: absolute;
  left: var(--x);
  top: var(--y);
  font-size: 20px;
  animation: twinkle 1.4s ease-in-out infinite alternate;
  animation-delay: calc(var(--i) * 0.35s);
}

.dn-cast { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 4px; }
/* The buddy rocks sleepily instead of bobbing; the speech bubble stays still. */
.dn-buddy .mascot-svg { animation: dn-rock 4s ease-in-out infinite; }
.dn-home { font-size: 64px; line-height: 1; filter: drop-shadow(0 4px 3px rgba(0, 0, 0, 0.12)); }

.dn-kicker { margin-top: 14px; font-size: 18px; font-weight: 600; color: var(--ink-soft); }
.dn-kicker + .dn-title { margin-top: 2px; }
.dn-title { margin-top: 14px; font-size: clamp(28px, 6vw, 40px); line-height: 1.15; }
.dn-line { margin-top: 8px; font-size: 21px; color: var(--ink-soft); }
.dn-today {
  display: inline-block;
  margin-top: 18px;
  padding: 10px 20px;
  border-radius: 20px;
  background: #fff;
  font-size: 19px;
  font-weight: 500;
  box-shadow: 0 4px 0 rgba(160, 124, 245, 0.18);
}

.dn-actions { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.dn-more { font-size: 18px; padding: 10px 22px; }
.dn-wait { font-size: 16px; color: var(--ink-soft); }

@keyframes dn-rock { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }

@media (max-width: 520px) {
  .dn-card { padding: 84px 16px 22px; border-radius: 32px; }
  .dn-home { font-size: 52px; }
  .dn-line { font-size: 18px; }
  .dn-today { font-size: 17px; }
  .dn-actions .btn-big { font-size: 22px; padding: 14px 26px; }
}

/* ——— Speedy Town: a dusky blue sky over the station ——— */

html[data-theme='town'] .dn-card {
  background: linear-gradient(180deg, #d4e6ff 0%, #e6f1ff 50%, #eef8e6 100%);
  box-shadow: 0 10px 0 #b9d4f5, var(--shadow);
}
html[data-theme='town'] .dn-today { box-shadow: 0 4px 0 rgba(61, 139, 255, 0.18); }
