
.ms-overlay {
  position: fixed; inset: 0; z-index: 45; display: grid; place-items: center; overflow-y: auto; padding: 16px;
  background: radial-gradient(circle at 50% 22%, color-mix(in srgb, var(--orange) 26%, var(--bg)) 0, var(--bg) 62%);
  animation: fadeIn .2s ease-out;
}
.ms-overlay.out { animation: fadeOut .22s ease-in forwards; }
.ms-confetti { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.ms-confetti i { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 3px; animation: fall linear forwards; }
@media (prefers-reduced-motion: reduce) { .ms-confetti { display: none; } }
.ms-inner { position: relative; z-index: 1; width: 100%; max-width: 360px; display: grid; gap: 12px; text-align: center; animation: popIn .4s cubic-bezier(.2, 1.4, .4, 1); }
.ms-flame { display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 0 auto; width: 136px; height: 136px; border-radius: 50%;
  background: var(--card); box-shadow: 0 0 0 6px color-mix(in srgb, var(--orange) 30%, transparent), var(--shadow); animation: msGlow 1.6s ease-in-out infinite; }
.ms-num { margin-top: -2px; font-family: var(--display); font-weight: 600; font-size: 36px; line-height: 1; color: var(--orange-ink); }
.ms-title { font-family: var(--display); font-weight: 600; font-size: 30px; line-height: 1.15; color: var(--orange-ink); }
.ms-scene { display: flex; justify-content: center; align-items: flex-end; gap: 4px; padding-top: 26px; }
.ms-fig { display: inline-block; }
.ms-talk { display: grid; gap: 8px; text-align: left; }
.ms-line { background: var(--card); border: 2px solid var(--line); border-radius: 16px; padding: 10px 14px; font-weight: 700; line-height: 1.35; }
.ms-line b { display: block; font-family: var(--display); font-weight: 600; color: var(--teal-dark); font-size: 14px; }
.ms-line--capy b { color: var(--orange-ink); }
.ms-reward { display: flex; justify-content: center; }
.ms-taler { display: inline-flex; align-items: center; gap: 6px; padding: 6px 16px; border-radius: 99px; background: var(--card);
  border: 2px solid var(--gold); font-family: var(--display); font-weight: 600; font-size: 24px; color: var(--ink); }
.ms-item { display: flex; align-items: center; gap: 12px; text-align: left; background: var(--card); border: 2px solid var(--line); border-radius: 18px; padding: 8px 12px; }
.ms-item__fig { flex: none; display: grid; place-items: center; width: 76px; height: 76px; border-radius: 16px; background: var(--orange-soft); overflow: hidden; }
.ms-item > span:last-child { display: grid; gap: 2px; }
.ms-item b { font-family: var(--display); font-weight: 600; font-size: 18px; }
@keyframes msGlow { 50% { box-shadow: 0 0 0 14px color-mix(in srgb, var(--orange) 16%, transparent), var(--shadow); } }
@media (prefers-reduced-motion: reduce) { .ms-flame { animation: none; } }

.repair, .welcome { display: grid; gap: 14px; }
.repair__ways { display: grid; gap: 10px; }
.repair__way { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; text-align: left; font: inherit; color: inherit; cursor: pointer;
  background: var(--card); border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 18px; }
.repair__way:not(:disabled):active { transform: translateY(2px); border-bottom-width: 2px; }
.repair__way:disabled { cursor: default; opacity: .6; }
.repair__way[data-repair="taler"]:not(:disabled) { border-color: var(--gold); }
.repair__way[data-repair="quest"] { border-color: var(--teal); }
.repair__icon { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--orange-soft); }
.repair__way[data-repair="quest"] .repair__icon { background: var(--teal-soft); }
.repair__txt { display: grid; gap: 2px; }
.repair__txt b { font-family: var(--display); font-weight: 600; font-size: 18px; }

.welcome h2 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 26px; }
.welcome h3 { margin: 6px 0 0; font-family: var(--display); font-weight: 600; font-size: 19px; }
.welcome p { margin: 0; }
.welcome__scene { display: flex; justify-content: center; align-items: flex-end; gap: 0; }
.welcome__text { text-align: center; font-family: var(--display); font-weight: 500; font-size: 18px; line-height: 1.4; }
.welcome__gift { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-color: var(--turbo); background: var(--turbo-soft); }
.welcome__gift b { font-family: var(--display); font-weight: 600; }

.today.serier { border-color: var(--orange); background: linear-gradient(135deg, color-mix(in srgb, var(--orange) 16%, transparent), transparent 70%), var(--card); }
.today.serieq { border-color: var(--teal); background: linear-gradient(135deg, color-mix(in srgb, var(--teal) 16%, transparent), transparent 70%), var(--card); }
.today.serieq .today__go { background: var(--teal); }
.today.serier .today__text b, .today.serieq .today__text b { font-size: 18px; line-height: 1.2; }
.today.serieq .bar { display: block; height: 10px; margin: 4px 0 2px; }
.today.serieq .bar > span { background: var(--teal); }
.serieq__card p { margin: 0; }
.serieq__card .tsbar span { background: var(--teal); }

.nextms { display: grid; gap: 8px; }
.nextms__head { display: flex; align-items: center; gap: 8px; }
.nextms__head b { font-family: var(--display); font-weight: 600; font-size: 18px; }
.nextms .bar { height: 10px; }

.scal { display: grid; gap: 10px; }
.scal__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.scal__head b { font-family: var(--display); font-weight: 600; font-size: 19px; }
.scal__nav { width: 40px; height: 40px; border-radius: 12px; border: 2px solid var(--line); background: var(--card); color: var(--ink);
  font: 600 22px/1 var(--display); cursor: pointer; }
.scal__nav:disabled { opacity: .35; cursor: default; }
.scal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.scal__wait { grid-column: 1 / -1; text-align: center; padding: 20px 0; }
.scal__wd { text-align: center; font-size: 12px; font-weight: 800; color: var(--muted); }
.scal__day { min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; aspect-ratio: 1; border-radius: 10px;
  background: color-mix(in srgb, var(--line) 55%, transparent); }
.scal__day small { font-size: 11px; font-weight: 800; line-height: 1.1; color: var(--muted); }
.scal__day.played { background: var(--orange-soft); }
.scal__day.pillow { background: var(--teal-soft); }
.scal__day.repaired { background: var(--turbo-soft); }
.scal__day.today { box-shadow: inset 0 0 0 2px var(--orange); }
.scal__day .scal__dot { line-height: 0; }
.scal__day:has(.scal__dot) small { color: var(--ink); }
.scal__dot { display: inline-grid; place-items: center; font-style: normal; }
.scal__legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; }
.scal__legend span { display: inline-flex; align-items: center; gap: 4px; }
.scal__legend .scal__dot { width: 24px; height: 24px; border-radius: 8px; }
.scal__legend .scal__dot.played { background: var(--orange-soft); }
.scal__legend .scal__dot.pillow { background: var(--teal-soft); }
.scal__legend .scal__dot.repaired { background: var(--turbo-soft); }
