/* W335 RESULTS + VERSUS (docs/notes/W335-results-versus.md, catalogue lane D). Presentation only: nothing here reaches the fight,
   the save or a reward. Every moving part stops under REDUCE MOTION (html[data-anim="none"]) and the battery saver. */

/* ---- E-054 the battle report's details card (public/js/tally.js detailOpen) */
#tallyOv.tyJourney .tyRow.tap { cursor: pointer; }
/* W340 E-022: a row you can tap is a 44 px thumb target (it was 32-39 px) */
#tallyOv .tyRow.tap, #tallyOv.tyJourney .tyRow.tap { min-height: 44px; }
#tallyOv.tyJourney .tyRow.tap:focus-visible { outline: 2px solid #4c2674; outline-offset: 1px; }
.tyCard { position: relative; }
.tyDetail {
  position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center; padding: 16px;
  box-sizing: border-box; background: rgba(36, 21, 60, .55);
}
.tyDetailBox {
  --ty-col: #4dabf7;
  width: min(100%, 340px); box-sizing: border-box; padding: 14px 14px 12px; border: 2px solid #24153c; border-top: 6px solid var(--ty-col);
  border-radius: 14px; background: #fffdf4; color: #24153c; box-shadow: 4px 4px 0 #24153c;
}
.tyDetail[data-side="rival"] .tyDetailBox { --ty-col: #ff6b6b; }
.tyDetailHead { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; align-items: center; margin-bottom: 10px; }
.tyDetailArt { width: 56px; height: 56px; border-radius: 12px; overflow: hidden; background: #eee6f6; display: flex; align-items: center; justify-content: center; box-shadow: inset 0 0 0 2px var(--ty-col); }
.tyDetailArt canvas, .tyDetailArt img, .tyDetailArt svg { width: 100%; height: 100%; object-fit: contain; }
.tyDetailName { font: 400 22px/1.05 'Bangers', cursive; letter-spacing: .8px; overflow-wrap: anywhere; }
.tyDetailSub { margin-top: 2px; font-size: 11px; font-weight: 900; color: #62516e; letter-spacing: .4px; overflow-wrap: anywhere; }
.tyDetailFacts { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.tyDetailFact { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 6px 9px; border-radius: 9px; background: #f3edf9; }
.tyDetailFact span { font-size: 11px; font-weight: 900; letter-spacing: .5px; color: #493f59; }
.tyDetailFact b { font: 400 19px/1 'Bangers', cursive; letter-spacing: .6px; color: #4c2674; font-variant-numeric: tabular-nums; }
.tyDetailFact[data-k="dmg"] b { font-size: 24px; }
.tyDetailClose { width: 100%; }

/* ---- E-055 the Snack Box with the staged rewards (index.html renderOverSnack places it right under #overChest) */
#over[data-result-phase="rewards"] #overSnack { margin: 10px 0 4px; text-align: center; }
#over[data-result-phase="rewards"] #snackClaimBtn {
  width: 100%; min-height: 56px; padding: 12px; border: 2px solid #2b7a3a; border-radius: 16px; background: linear-gradient(#b6f08a, #6cc24a);
  color: #123b1c; font-family: 'Bangers', cursive; font-size: 20px; letter-spacing: 1px; text-shadow: none; box-shadow: 0 4px 0 #2b7a3a;
}
.w335SnackCap { margin-top: 5px; font-size: 11px; font-weight: 900; letter-spacing: .6px; color: #3f6a2e; }

/* ---- E-059 the trophy band badge: on the versus card (battle-versus.js) and on an OVERALL leaderboard row (leaderboard.js) */
.bvBand, .lbBand {
  --bv-band: #cfd6e6;
  display: inline-block; align-self: center; margin: 4px auto 2px; padding: 2px 9px; border-radius: 999px; border: 2px solid #1b1430;
  background: var(--bv-band); color: #1b1430; font: 400 13px/1.2 'Bangers', cursive; letter-spacing: 1px; white-space: nowrap;
  box-shadow: 0 2px 0 #1b1430;
}
.lbBand { --lb-band: #cfd6e6; background: var(--lb-band); margin: 0 6px 0 0; padding: 0 7px; font-size: 11px; border-width: 1.5px; box-shadow: none; vertical-align: 1px; }

/* ---- E-053 the battle report's KOs and ENERGY columns (your side), a star on the best of each */
#tallyOv.tyJourney .tyPanel.tyHasCols .tyRow,
#tallyOv.tyJourney .tyColHead { grid-template-columns: 30px minmax(0, 1fr) 36px 44px 52px; column-gap: 6px; }
#tallyOv.tyJourney .tyColHead { display: grid; padding: 0 3px 3px; font-size: 9.5px; font-weight: 900; letter-spacing: .5px; color: #62516e; }
#tallyOv.tyJourney .tyColHead .c { text-align: right; }
.tyCol { text-align: right; font-size: 13px; font-weight: 900; color: #315575; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tyCol.mvp b { color: #a05a00; }
.tyMvp { font-style: normal; font-size: 10px; color: #e0a400; margin-right: 2px; }

/* ---- E-057 the versus card's LEADER tile (battle-versus.js): the sixth tile of the lineup row, a gold frame and a star; tap = its card */
#vsStrip.bvScreen .bvLeader .bvLeaderArt { border-color: #ffd23f; background-color: #3b2a12; }
#vsStrip.bvScreen .bvLeaderArt canvas, #vsStrip.bvScreen .bvLeaderArt img, #vsStrip.bvScreen .bvLeaderArt svg { display: block; width: 40px; height: 40px; object-fit: contain; }
.bvLeaderStar { position: absolute; left: -3px; top: -5px; font-style: normal; font-size: 14px; line-height: 1; color: #ffd23f; text-shadow: 0 1px 0 #100d20, 1px 0 0 #100d20, -1px 0 0 #100d20; pointer-events: none; }
/* the band badge sits inline beside the side's label (YOU / RIVAL), so the card grows no taller */
#vsStrip.bvScreen .bvSideLabel .bvBand { margin: -3px 0 0 6px; padding: 1px 7px; font-size: 11px; letter-spacing: .8px; border-width: 1.5px; box-shadow: none; vertical-align: middle; }

/* ---- E-219 your Passport card on the search scene (search-presentation.js passportCard): its border and look, scaled to the scene */
.pqsScene.pqsHasCard .pqsBadge { inset: auto 8px 8px auto; filter: drop-shadow(0 3px 0 #051e3b); }
.pqsScene.pqsHasCard .pqsBadge > .ci, .pqsScene.pqsHasCard .pqsBadge > svg { width: 38px; height: 38px; }
.pqsPassport {
  position: absolute; left: 50%; top: 50%; width: min(290px, 80%); transform: translate(-50%, -50%); transform-origin: 50% 50%;
  pointer-events: none; filter: drop-shadow(0 6px 0 #051e3b);
}
.pqsPassport .cppCard { margin: 0; }

/* ---- E-030 (search half) ambient life on the search card: the city drifts slowly and a turned tip fades in - FULL animations only */
.pqsSearch.pqsAlive .pqsScene { background-size: auto 135%; animation: w335CityDrift 26s ease-in-out infinite alternate; }
@keyframes w335CityDrift { from { background-position: 32% 42%; } to { background-position: 68% 56%; } }
.pqsTipCopy.pqsTipIn { animation: w335TipIn .35s ease-out; }
@keyframes w335TipIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
html[data-anim="none"] .pqsSearch.pqsAlive .pqsScene, html[data-anim="some"] .pqsSearch.pqsAlive .pqsScene,
html[data-anim="none"] .pqsTipCopy.pqsTipIn, html[data-anim="some"] .pqsTipCopy.pqsTipIn { animation: none; }
@media (prefers-reduced-motion: reduce) { .pqsSearch.pqsAlive .pqsScene, .pqsTipCopy.pqsTipIn { animation: none; } }

/* ---- E-056 PLAY AGAIN beside NEXT on the last REWARDS step - only while RESULT_PLAY_AGAIN is on (J's word; the default is NEXT only) */
#over[data-result-phase="rewards"][data-result-again="1"] .overActs { gap: 10px; }
#over[data-result-phase="rewards"][data-result-again="1"] .overActs > button#againBtn {
  display: block !important; flex: 1 1 0; min-width: 0; min-height: 56px; margin: 0; border: 2px solid #193957; border-radius: 15px;
  background: linear-gradient(#7ee0ff, #3fa9e8); color: #0e2a45; font-size: 22px; letter-spacing: 1px; box-shadow: 0 5px 0 #1d5f8f; text-shadow: none;
}
#over[data-result-phase="rewards"][data-result-again="1"] #resultJourneyNext { flex: 1 1 0; width: auto; min-width: 0; }

/* ---- W348 (E-058 follow-up) the coin receipt on the RESULT page. The coin shower aimed at the counter on the REWARDS page, which is hidden while
   the RESULT page shows, so it never played. The receipt (coin + "+N COINS") now sits at the top of the RESULT page, where the coins can fly
   into it; the REWARDS page still shows the whole row. Nothing here changes what is earned. */
#over[data-result-phase="outcome"] #overBody { display: flex; flex-direction: column; }
#over[data-result-phase="outcome"] #overBody > * { flex: 0 0 auto; }
#over[data-result-phase="outcome"] #overBody > #overReward { order: -1; display: none; margin: 0 0 14px; min-height: 0; justify-content: center; }
#over[data-result-phase="outcome"] #overBody > #overReward:has(.rwCoin132) { display: flex; }
#over[data-result-phase="outcome"] #overReward > :not(.rwEarn) { display: none; }
#over[data-result-phase="outcome"] #overReward .rwEarn > :not(.ci-coin):not(.rwCoin132) { display: none; }
