/* Replays (ui/replay.js): the overlay while one plays, the toast, the Replays list. Same cartoon look as style.css. */
.rp { position: absolute; inset: 0; z-index: 4; pointer-events: none; font-family: "Fredoka", sans-serif; color: var(--ink); }
.rp-top { position: absolute; top: calc(var(--st) + 0.6rem); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 0.6rem;
  padding: 0.25rem 1rem; border-radius: 1.2rem; border: 0.18rem solid var(--ink); background: rgba(255, 245, 214, 0.94); box-shadow: 0 0.2rem 0 rgba(43, 15, 28, 0.4); white-space: nowrap; }
.rp-tag { font-family: "Lilita One", sans-serif; font-weight: 400; letter-spacing: 0.12em; text-transform: uppercase; color: #e2457c; font-size: 1.05rem; }
.rp-tag::before { content: ""; display: inline-block; width: 0.7em; height: 0.7em; border-radius: 50%; background: #e2457c; margin-right: 0.45em; animation: rp-blink 1s steps(2, jump-none) infinite; }
@keyframes rp-blink { 50% { opacity: 0.25; } }
.rp-clock { font-family: "Lilita One", sans-serif; font-size: 1.05rem; min-width: 4.4em; text-align: center; font-variant-numeric: tabular-nums; }
.rp-sub { font-weight: 600; font-size: 0.85rem; opacity: 0.75; }
.rp-sub:empty { display: none; }
.rp-msg { position: absolute; bottom: calc(var(--sb) + 5.2rem); left: 50%; transform: translateX(-50%); margin: 0; max-width: min(34rem, 86%); text-align: center; font-weight: 700;
  padding: 0.35rem 1rem; border-radius: 1rem; border: 0.16rem solid var(--ink); background: rgba(255, 245, 214, 0.95); }
.rp-msg[hidden] { display: none; }
.rp-bar { position: absolute; left: 50%; top: calc(var(--st) + 3.5rem); transform: translateX(-50%); display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  flex-wrap: wrap; max-width: 96%; pointer-events: auto; }
.rp-bar .btn { min-height: 2.75rem; min-width: 2.75rem; }
.rp-bar .rp-b b { white-space: nowrap; }
.rp-bar .rp-b small { font-size: 0.6em; opacity: 0.8; }
.rp-bar .rp-b.on { background: linear-gradient(#ffd0e0, #ff7aa8); color: #fff; text-shadow: var(--outline); }
.rp-speeds { background: #fff; }
.rp-speeds button { min-width: 2.75rem; min-height: 2.75rem; }
.rp-prog { width: min(14rem, 30vw); height: 0.8rem; border: 0.14rem solid var(--ink); border-radius: 0.5rem; background: #fff; overflow: hidden; }
.rp-prog i { display: block; height: 100%; width: 0; background: linear-gradient(#ffb0cb, #e2457c); }
.rp.saved .rp-top { top: calc(var(--st) + 0.6rem); }

.rp-toast { position: absolute; left: 50%; bottom: calc(var(--sb) + 7rem); transform: translateX(-50%); z-index: 9; max-width: 80%; text-align: center; pointer-events: none; opacity: 0;
  transition: opacity 0.2s; padding: 0.4rem 1.1rem; border-radius: 1.2rem; border: 0.18rem solid var(--ink); background: rgba(255, 245, 214, 0.96); font-weight: 700; }
.rp-toast.on { opacity: 1; }

#touch .chip.replay { left: 0; right: auto; top: 3.4rem; }
#ui.replays { justify-content: flex-start; align-items: stretch; padding: calc(var(--st) + 0.6rem) calc(var(--sr) + 0.8rem) calc(var(--sb) + 0.6rem) calc(var(--sl) + 0.8rem); box-sizing: border-box;
  background: linear-gradient(rgba(30, 14, 50, 0.35), rgba(30, 14, 50, 0.55)); }
.rp-list { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; }
.rp-list ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.rp-item { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; flex-wrap: wrap; background: var(--cream); border: 0.2rem solid var(--ink); border-radius: 1.1rem;
  box-shadow: 0 0.35rem 0 rgba(43, 15, 28, 0.35); padding: 0.6rem 0.9rem; }
.rp-item.bad { background: #ffe3dc; }
.rp-info { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; flex: 1 1 14rem; }
.rp-info b { font-family: "Lilita One", sans-serif; font-weight: 400; font-size: 1.15rem; overflow-wrap: anywhere; }
.rp-info span { font-size: 0.82rem; font-weight: 600; opacity: 0.75; }
.rp-info .rp-why { color: #b3261e; opacity: 1; }
.rp-btns { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.rp-note { min-height: 1.4em; font-weight: 700; margin: 0.5rem 0 0; }
.rp-saved { font-weight: 700; }
