/* "What's new" sheet in Bopster Live (js/live-news.js): now Timeline.
   Same glass and rules as the Game modes sheet (css/live-app.css): plain white title,
   sentence case, white primary button. The cards are css/bop-timeline.css. */
.lvn { position: fixed; inset: 0; z-index: 1250; display: grid; align-items: end; justify-items: center; }
.lvn[hidden] { display: none; }
.lvn-back { position: absolute; inset: 0; background: rgba(3, 5, 14, .6); opacity: 0; transition: opacity .25s ease; }
.lvn-panel {
    position: relative; display: grid; justify-items: center; gap: .55rem;
    width: min(100%, 30rem); max-height: min(94vh, 50rem); overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
    padding: 1.3rem 1.1rem calc(1rem + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0;
    background: var(--lv-glass, linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.02))), rgba(17, 22, 40, .92);
    border: 1px solid var(--lv-rim, rgba(255,255,255,.16)); border-top-color: rgba(255, 255, 255, .32); border-bottom: 0;
    box-shadow: 0 -20px 50px -20px rgba(0, 0, 0, .8);
    backdrop-filter: blur(26px) saturate(170%); -webkit-backdrop-filter: blur(26px) saturate(170%);
    color: #fff; text-align: center;
    transform: translateY(30px); opacity: 0; transition: transform .28s cubic-bezier(.2, 1.2, .4, 1), opacity .22s ease;
}
.lvn.is-open .lvn-back { opacity: 1; }
.lvn.is-open .lvn-panel { transform: none; opacity: 1; }
@media (min-width: 700px) { .lvn { align-items: center; } .lvn-panel { border-radius: 26px; border-bottom: 1px solid var(--lv-rim, rgba(255,255,255,.16)); } }

.lvn-x { position: absolute; top: .8rem; right: .8rem; display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .08); color: #fff; font-size: .9rem; cursor: pointer; }
.lvn-x:hover { background: rgba(255, 255, 255, .16); }
.lvn-badge { padding: .22rem .65rem; border-radius: 999px; background: rgba(34, 211, 238, .14); border: 1px solid rgba(34, 211, 238, .4); color: #a5f3fc; font-size: .74rem; font-weight: 800; }
.lvn-panel h3 { margin: 0; font-size: clamp(1.55rem, 6.5vw, 2rem); font-weight: 900; letter-spacing: -.03em; line-height: 1.1; }
.lvn-lead { max-width: 24rem; margin: 0; color: rgba(226, 232, 255, .72); font-size: .9rem; line-height: 1.45; }

/* The stage: one scene per step, a row of real cards ---------------------- */
.lvn-stage {
    --bc: min(21vw, 6rem);
    position: relative; width: calc(100% + 2.2rem); height: calc(var(--bc) * 2.25); margin: .3rem -1.1rem 0; overflow: hidden;
    background: radial-gradient(70% 90% at 50% 60%, rgba(139, 92, 246, .22), transparent 70%);
}
.lvn-scene { position: absolute; inset: 0; display: none; }
.lvn-scene.is-on { display: block; }
.lvn-row {
    position: absolute; left: 50%; top: 58%; display: flex; align-items: center; transform: translate(-50%, -50%);
}
.lvn-row::before { content: ""; position: absolute; left: -1.5rem; right: -1.5rem; top: 50%; height: 3px; border-radius: 3px; background: linear-gradient(90deg, rgba(244,114,182,.5), rgba(167,139,250,.5), rgba(34,211,238,.5)); z-index: -1; }
.lvn-row .bopcard, .lvn-row .bopcard-flip { --bc: inherit; }
.lvn-gap { position: relative; display: flex; align-items: center; justify-content: center; width: .5rem; height: var(--bc); }
.lvn-gap.is-open { width: calc(var(--bc) + .7rem); }
.lvn-gap.is-flag { width: 1.6rem; }
.lvn-gap.is-flag::after { content: ""; width: 4px; height: 70%; border-radius: 4px; background: #f472b6; box-shadow: 0 0 12px rgba(244, 114, 182, .8); }

/* 1: the deal */
.lvn-deal .bopcard { animation: lvn-deal .6s cubic-bezier(.2, 1.4, .4, 1) both; }
.lvn-deal .lvn-c1 { animation-delay: .15s; }
.lvn-deal .lvn-c2 { animation-delay: .5s; }
.lvn-deal .lvn-c3 { animation-delay: .85s; }
@keyframes lvn-deal { from { opacity: 0; transform: translate(0, -140%) rotate(-25deg) scale(.6); } }
.lvn-players { position: absolute; left: 50%; top: 8%; display: flex; gap: calc(var(--bc) * .62); transform: translateX(-50%); }
.lvn-players i { display: grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: hsl(var(--h) 75% 62%); color: #0b0820; font-style: normal; font-size: .8rem; font-weight: 900; box-shadow: 0 0 0 2px rgba(255, 255, 255, .35); animation: lvn-pop .4s cubic-bezier(.2, 1.6, .4, 1) both; }
.lvn-players i:nth-child(2) { animation-delay: .35s; }
.lvn-players i:nth-child(3) { animation-delay: .7s; }
@keyframes lvn-pop { from { opacity: 0; transform: scale(.3); } }

/* 2: the gap opens and the face-down card drops in, a finger guiding it */
.lvn-scene[data-scene="1"] .lvn-gap.is-open { animation: lvn-open .5s ease .5s both; }
@keyframes lvn-open { from { width: .5rem; } }
.lvn-drop { box-shadow: 0 0 0 3px #22d3ee, 0 .8rem 1.6rem rgba(34, 211, 238, .45); animation: lvn-drop 1.2s cubic-bezier(.3, 1.2, .5, 1) .2s both; }
@keyframes lvn-drop { 0% { transform: translate(90%, -150%) rotate(12deg) scale(1.1); } 55% { transform: translate(0, -45%) rotate(-4deg) scale(1.08); } 100% { transform: none; } }
.lvn-finger {
    position: absolute; left: 50%; top: 58%; width: 2rem; height: 2rem; margin-left: calc(var(--bc) * -.95); border-radius: 50%;
    background: rgba(255, 255, 255, .9); box-shadow: 0 0 0 6px rgba(255, 255, 255, .2);
    animation: lvn-finger 1.2s cubic-bezier(.3, 1.2, .5, 1) .2s both, lvn-fade .4s ease 1.6s forwards;
}
@keyframes lvn-finger { 0% { transform: translate(calc(var(--bc) * 1.2), calc(var(--bc) * -1.25)); } 100% { transform: translate(0, 0); } }
@keyframes lvn-fade { to { opacity: 0; transform: scale(.4); } }

/* 3: a flag and a token on another gap */
.lvn-wait { box-shadow: 0 0 0 3px rgba(255, 255, 255, .6); }
.lvn-flag {
    position: absolute; bottom: calc(100% + .4rem); left: 50%; display: inline-flex; align-items: center; gap: .25rem; padding: .15rem .55rem .15rem .2rem;
    border-radius: 999px; border: 1.5px dashed #f9a8d4; background: rgba(131, 24, 67, .85); font-size: .72rem; font-weight: 800; white-space: nowrap;
    transform: translateX(-50%); animation: lvn-flag .5s cubic-bezier(.2, 1.6, .4, 1) .6s both;
}
.lvn-flag i { display: grid; place-items: center; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: #f472b6; color: #3b0420; font-style: normal; font-size: .65rem; }
@keyframes lvn-flag { from { opacity: 0; transform: translate(-50%, -80%) scale(.5); } }
.lvn-coin {
    position: absolute; left: 50%; top: 50%; z-index: 2; width: 1.7rem; height: 1.7rem; margin: -.85rem 0 0 -.85rem;
    background: url('/img/cards/bopcard-token.webp') center / contain no-repeat; filter: drop-shadow(0 2px 6px rgba(251, 191, 36, .6));
    animation: lvn-coin 1s cubic-bezier(.3, 1.3, .5, 1) 1s both;
}
@keyframes lvn-coin { from { opacity: 0; transform: translateY(calc(var(--bc) * -1.4)) rotate(-200deg) scale(1.4); } }

/* 4: turned over, and the race to 10 */
.lvn-turn .bopcard.is-y { box-shadow: 0 0 0 3px #4ade80, 0 .8rem 1.8rem rgba(74, 222, 128, .5); }
.lvn-win {
    position: absolute; left: 50%; top: 9%; display: inline-flex; align-items: center; gap: .5rem; padding: .3rem .75rem;
    border-radius: 999px; background: rgba(255, 255, 255, .08); transform: translateX(-50%); font-size: .8rem;
    animation: lvn-pop .45s cubic-bezier(.2, 1.6, .4, 1) 1.6s both;
}
.lvn-win b { font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lvn-win .btl-pips i { width: 7px; height: 11px; }

/* The steps under the stage ------------------------------------------------ */
.lvn-steps { display: grid; width: 100%; min-height: 4.6rem; }
.lvn-step { grid-area: 1 / 1; display: grid; gap: .25rem; opacity: 0; transform: translateY(6px); transition: opacity .3s ease, transform .3s ease; pointer-events: none; }
.lvn-step.is-on { opacity: 1; transform: none; pointer-events: auto; }
.lvn-step b { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; font-size: 1.05rem; font-weight: 800; }
.lvn-step b span { display: grid; place-items: center; width: 1.45rem; height: 1.45rem; border-radius: 50%; background: #fff; color: #11152a; font-size: .78rem; font-weight: 900; }
.lvn-step p { max-width: 24rem; margin: 0 auto; color: rgba(226, 232, 255, .72); font-size: .86rem; line-height: 1.45; }
.lvn-nav { display: flex; align-items: center; gap: .8rem; }
.lvn-arrow { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border: 1px solid rgba(255, 255, 255, .14); border-radius: 50%; background: rgba(255, 255, 255, .05); color: #fff; font-size: 1.3rem; line-height: 1; cursor: pointer; }
.lvn-arrow:hover { background: rgba(255, 255, 255, .12); }
.lvn-dots { display: flex; gap: .4rem; }
.lvn-dots button { width: .55rem; height: .55rem; padding: 0; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .25); cursor: pointer; transition: width .25s ease, background .25s ease; }
.lvn-dots button[aria-selected="true"] { width: 1.5rem; background: #fff; }
.lvn-note { margin: .1rem 0 0; color: rgba(226, 232, 255, .55); font-size: .76rem; }
.lvn-actions { display: grid; gap: .45rem; width: 100%; margin-top: .2rem; }
.lvn-try { min-height: 3.1rem; border: 0; border-radius: 999px; background: #fff; color: #11152a; font: inherit; font-size: 1rem; font-weight: 800; cursor: pointer; transition: transform .12s; }
.lvn-try:active { transform: scale(.98); }
.lvn-later { min-height: 2.6rem; border: 0; border-radius: 999px; background: transparent; color: rgba(226, 232, 255, .7); font: inherit; font-size: .9rem; font-weight: 700; cursor: pointer; }
.lvn-later:hover { color: #fff; }

@media (prefers-reduced-motion: reduce) {
    .lvn-scene *, .lvn-scene *::before, .lvn-scene *::after { animation-duration: .01s !important; animation-delay: 0s !important; }
    .lvn-panel, .lvn-step { transition: none; }
}
html.lv-battery .lvn-panel { backdrop-filter: none; -webkit-backdrop-filter: none; background: #161c30; }
