/* v12 Sticker Album: the stage, the in-play HUD, the markers, the sticker pack, the reaction slap, the reveal. */
.stage { position: fixed; inset: 0; z-index: 1; }
.stage.is-off { visibility: hidden; }
.stage.is-reveal { visibility: hidden; }
.stage.is-placing .pt-mk { visibility: hidden; }
.stage.is-reveal > .pt-clip {
  visibility: visible; opacity: 1; top: calc(var(--safe-t) + 104px); left: 16px; width: calc(100% - 32px);
  height: calc((100vw - 32px) * .5625); border-radius: 18px; border: 4px solid #fff; object-fit: cover; background: #0d1230;
  box-shadow: 0 0 0 3px var(--ink), 0 7px 0 3px var(--ink); animation: clip-in .45s cubic-bezier(.2,1.3,.4,1) both;
}
@keyframes clip-in { from { transform: scale(.85) rotate(-3deg); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- markers: chunky round stickers on the pitch ---------- */
.mk { position: relative; display: grid; place-items: center; width: 60px; height: 60px; }
.mk__face {
  position: relative; z-index: 1; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  background: var(--sun); color: var(--ink); border: 3.5px solid var(--ink); box-shadow: 0 5px 0 var(--ink), 0 0 0 5px rgba(255,255,255,.55);
  font: 700 25px/1 var(--f-round); animation: mk-in .4s cubic-bezier(.2,1.7,.4,1) both; animation-delay: calc(var(--i, 0) * 80ms);
  transition: background-color .2s, transform .2s;
}
.mk__halo { position: absolute; inset: -4px; border-radius: 50%; border: 3px solid #fff; opacity: 0; animation: halo 1.5s ease-out infinite; animation-delay: calc(var(--i, 0) * 200ms); will-change: transform, opacity; }
@keyframes mk-in { from { transform: scale(0) rotate(-40deg); } to { transform: none; } }
@keyframes halo { 0% { transform: scale(.8); opacity: .9; } 100% { transform: scale(1.5); opacity: 0; } }
.pt-mk:active .mk__face { transform: scale(.88); }
.mk__tag {
  position: absolute; top: calc(100% + 2px); left: 50%; translate: -50% 0; display: none; white-space: nowrap; padding: 5px 10px; border-radius: 999px;
  border: 2.5px solid var(--ink); background: #fff; color: var(--ink); font: 700 13px/1 var(--f-round); box-shadow: 0 3px 0 var(--ink);
}
.pt-answered .pt-mk .mk__halo { display: none; }
.pt-mk.is-pro .mk__face { background: var(--green); color: #fff; animation: mk-win .5s cubic-bezier(.2,1.7,.4,1); }
.pt-mk.is-pro .mk__tag--pro { display: block; }
.pt-mk.is-mine .mk__face { background: var(--pink); color: #fff; animation: mk-shake .4s; }
.pt-mk.is-mine .mk__tag--mine { display: block; }
.pt-mk.is-dim { opacity: .35; }
@keyframes mk-win { 0% { transform: scale(1); } 40% { transform: scale(1.35) rotate(10deg); } 100% { transform: none; } }
@keyframes mk-shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.pt-mk[data-edge=l]::before { left: -20px; border-width: 11px; border-right-color: var(--ink); }
.pt-mk[data-edge=r]::before { right: -20px; border-width: 11px; border-left-color: var(--ink); }

/* ---------- the HUD ---------- */
.hud { position: fixed; inset: 0; z-index: 5; pointer-events: none; overflow: hidden; }
.hud[hidden] { display: none; }
.hud__press { position: absolute; inset: 0; opacity: 0; background: radial-gradient(ellipse 75% 65% at 50% 45%, transparent 45%, rgba(255,40,100,.6) 100%); will-change: opacity; }
.hud__top { position: absolute; top: calc(var(--safe-t) + 12px); left: 12px; right: 72px; display: flex; }
.hud__chip {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 4px 14px 4px 4px; border-radius: 999px;
  background: #fff; border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); font: 700 15px/1 var(--f-round);
  animation: chip-in .4s cubic-bezier(.2,1.5,.4,1) both;
}
.hud__num { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--lc); color: #fff; border: 2.5px solid var(--ink); font-size: 16px; }
.hud__who { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes chip-in { from { transform: translateY(-30px); opacity: 0; } to { transform: none; opacity: 1; } }
.hud__bot {
  position: absolute; left: 0; right: 0; bottom: calc(var(--safe-b) + 12px); margin: 0 auto; width: min(720px, calc(100% - 20px));
  display: flex; align-items: flex-end; gap: 8px; transition: opacity .3s, transform .3s;
}
.hud.is-reveal .hud__bot { opacity: 0; transform: translateY(40px); }
.hud__pip { flex: none; }
.hud__pip .pip { --pip: 64px; }
.hud__pip .pip__eye { animation: none; }
.hud__bubble {
  position: relative; flex: 1; min-width: 0; min-height: 66px; display: flex; flex-direction: column; justify-content: center; gap: 3px;
  padding: 10px 14px; margin-bottom: 6px; border-radius: 22px; background: #fff; border: 3px solid var(--ink); box-shadow: 0 5px 0 var(--ink);
}
.hud__bubble::before {
  content: ''; position: absolute; left: -11px; bottom: 14px; width: 16px; height: 16px; background: #fff;
  border-left: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: rotate(45deg);
}
.hud__bubble.is-new { animation: bub-pop .35s cubic-bezier(.2,1.6,.4,1); }
@keyframes bub-pop { from { transform: scale(.9); } to { transform: none; } }
.hud__ctx { font: 600 13.5px/1.2 var(--f-body); color: var(--ink2); }
.hud__ctx[hidden] { display: none; }
.hud__q { font-size: 21px; line-height: 1.08; color: var(--ink); }
.hud.is-press.is-ask .hud__bubble, .hud--press.is-ask .hud__bubble { border-color: #d61f5c; }
.hud__timer {
  position: relative; flex: none; width: 76px; height: 76px; margin-bottom: 2px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; border: 3px solid var(--ink); box-shadow: 0 5px 0 var(--ink); opacity: 0; transform: scale(.4); transition: opacity .25s, transform .35s cubic-bezier(.2,1.6,.4,1);
}
.hud.is-ask .hud__timer { opacity: 1; transform: none; }
.hud__timer svg { position: absolute; inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); transform: rotate(-90deg); }
.hud__ringbg { fill: none; stroke: #e7ebf6; stroke-width: 7; }
.hud__ring { fill: none; stroke: var(--green); stroke-width: 7; stroke-linecap: round; }
.hud__sec { position: relative; font-size: 27px; line-height: 1; color: var(--ink); }
.hud__timer.is-hurry .hud__ring { stroke: var(--pink); }
.hud__timer.is-hurry .hud__sec { color: #d61f5c; }
.hud__timer.is-hurry { animation: hurry .5s ease-in-out infinite; }
@keyframes hurry { 50% { transform: scale(1.08); } }
.hud__threat {
  position: absolute; top: 42%; display: none; align-items: center; gap: 4px; padding: 9px 14px; border-radius: 999px;
  background: var(--pink); color: #fff; border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); font: 700 15px/1 var(--f-round);
}
.hud__threat .ico { width: 18px; height: 18px; }
.hud__threat.is-on { display: inline-flex; animation: nudge .7s ease-in-out infinite; }
.hud__threat.is-left { left: 10px; }
.hud__threat.is-right { right: 10px; }
.hud__threat.is-behind { top: auto; bottom: calc(var(--safe-b) + 120px); left: 50%; translate: -50% 0; }
@keyframes nudge { 50% { transform: scale(1.07); } }

/* the sticker pack that opens each moment */
.hud__pack { position: absolute; inset: 0; display: grid; place-items: center; }
.pack {
  position: relative; width: 230px; display: grid; gap: 6px; justify-items: center; padding: 26px 18px 22px; border-radius: 22px; color: #fff; text-align: center;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.14) 0 10px, transparent 10px 20px), var(--lc);
  border: 3.5px solid var(--ink); box-shadow: 0 8px 0 var(--ink); opacity: 0;
}
.pack small { font: 700 13px/1 var(--f-round); letter-spacing: .08em; text-transform: uppercase; background: var(--ink); padding: 6px 10px; border-radius: 999px; }
.pack b { font-size: 34px; line-height: 1; text-shadow: 0 3px 0 var(--ink); }
.pack span { font: 600 14px/1.2 var(--f-body); }
.pack__tear { position: absolute; top: 12px; left: -3px; right: -3px; height: 0; border-top: 3px dashed rgba(255,255,255,.7); }
.hud__pack.is-on .pack { animation: pack 1.05s cubic-bezier(.2,1.2,.4,1) both; }
@keyframes pack {
  0% { opacity: 0; transform: scale(.5) rotate(-10deg); }
  22% { opacity: 1; transform: scale(1.06) rotate(3deg); }
  34% { transform: scale(1) rotate(0); }
  80% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.25) translateY(-30px); }
}

/* the reaction slap after the tap */
.hud__slap { position: absolute; left: 0; right: 0; top: 30%; display: grid; place-items: center; }
.hud__slap:not(.is-on) .slap { display: none; }
.slap {
  position: relative; display: grid; gap: 4px; text-align: center; padding: 12px 26px 14px; border-radius: 24px;
  background: #fff; color: var(--ink); border: 4px solid var(--ink); box-shadow: 0 8px 0 var(--ink);
  transform: rotate(-5deg); animation: slap .5s cubic-bezier(.2,1.7,.4,1) both;
}
.slap b { font-size: 46px; line-height: 1; }
.slap span { font: 700 15px/1.2 var(--f-round); }
.slap--shiny { background: linear-gradient(135deg, #ffe066, #ff9ad5 40%, #8fd3ff 70%, #b8ffb0); }
.slap--got { background: var(--green); color: #fff; }
.slap--got b { text-shadow: 0 3px 0 var(--ink); }
@keyframes slap { 0% { transform: scale(2.2) rotate(-14deg); opacity: 0; } 60% { transform: scale(.94) rotate(-4deg); opacity: 1; } 100% { transform: rotate(-5deg); } }

/* ---------- the reveal sheet (under the real clip) ---------- */
.sheet {
  position: absolute; left: 12px; right: 12px; bottom: calc(var(--safe-b) + 12px); pointer-events: auto; display: grid; gap: 12px;
  padding: 14px 14px 18px; border-radius: 26px; background: var(--paper); border: 3px solid var(--ink); box-shadow: 0 8px 0 var(--ink);
  animation: sheet-in .5s cubic-bezier(.2,1.2,.4,1) both;
}
.sheet[hidden] { display: none; }
.sheet__pip { position: absolute; left: 10px; bottom: calc(100% + 4px); display: flex; align-items: flex-end; gap: 12px; animation: rise .5s .35s cubic-bezier(.2,1.3,.4,1) both; }
.sheet__pip .pip { --pip: 70px; }
.sheet__pip .bubble { margin-bottom: 26px; font-size: 16px; padding: 9px 13px; }
@media (max-height: 700px) { .sheet__pip { display: none; } }
@keyframes sheet-in { from { transform: translateY(110%); } to { transform: none; } }
.sheet__k { margin: 0; display: flex; align-items: center; gap: 8px; font: 600 13px/1.2 var(--f-body); color: var(--ink2); min-width: 0; }
.sheet__live { flex: none; padding: 4px 8px; border-radius: 6px; background: var(--ink); color: #fff; font: 700 11px/1 var(--f-round); letter-spacing: .06em; }
.sheet__row { display: flex; gap: 14px; align-items: center; }
.sheet__stk { flex: none; padding: 4px 6px 8px 2px; }
.sheet__stk .stk { --sw: 92px; animation: pop-in .5s .2s cubic-bezier(.2,1.6,.4,1) both; }
.sheet__stk .stk__tag { font-size: 11px; padding: 4px 7px; right: -10px; }
.sheet__stk .stk__num { width: 24px; height: 24px; font-size: 12px; border-width: 2.5px; }
.sheet__txt { min-width: 0; display: grid; gap: 5px; }
.sheet__txt h3 { margin: 0; font-size: 20px; line-height: 1.1; }
.sheet__pick { margin: 0; font: 700 17px/1.2 var(--f-round); color: var(--green); }
.sheet__saw { margin: 0; font: 600 14px/1.35 var(--f-body); color: var(--ink2); }
.sheet__times { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.t { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; padding: 9px 12px; border-radius: 14px; background: #fff; border: 2.5px solid rgba(26,33,80,.2); min-width: 0; }
.t small { font: 600 13px/1 var(--f-body); color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t b { font-size: 20px; line-height: 1; }
.t--pro { border-color: var(--green); }
.sheet--shiny .t--you, .sheet--got .t--you { border-color: var(--green); }

@media (min-width: 900px) {
  .stage.is-reveal > .pt-clip { left: 48px; top: 100px; width: calc(100vw - 96px - 440px - 32px); height: calc((100vw - 96px - 440px - 32px) * .5625); }
  .sheet { left: auto; right: 48px; top: 100px; bottom: auto; width: 440px; padding: 20px; }
  .sheet__pip { bottom: auto; top: calc(100% + 26px); left: 20px; }
  .sheet__pip .bubble::before { left: -11px; }
  .sheet__stk .stk { --sw: 120px; }
  .sheet__txt h3 { font-size: 23px; }
  .hud__pip .pip { --pip: 84px; }
  .hud__q { font-size: 26px; }
  .hud__ctx { font-size: 15px; }
  .hud__timer { width: 90px; height: 90px; }
  .hud__sec { font-size: 32px; }
  .hud__chip { font-size: 17px; }
}
