/* Owned result identity cards. No global controls, motion, assets or account presentation. */
.rmMatchup { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; width: 100%; max-width: 1120px; margin: 0 auto; color: #24153c; text-align: left; }
.rmMatchup, .rmMatchup * { box-sizing: border-box; }
.rmPanel { --rm-color: #f16a75; min-width: 0; padding: 13px; border: 3px solid #24153c; border-top: 8px solid var(--rm-color); border-radius: 18px; background: #fff9e9; box-shadow: 4px 5px 0 #24153c; }
.rmPanel[data-role="you"] { --rm-color: #55b8ed; }
.rmPanel[data-role="partner"] { --rm-color: #c3a3f4; }
.rmPlayer { margin: 0 0 10px; padding-bottom: 8px; border-bottom: 2px solid #24153c1c; color: #24153c; font: 900 13px/1.25 'Nunito', system-ui, sans-serif; letter-spacing: .8px; text-transform: uppercase; overflow-wrap: anywhere; }
.rmLeader { display: flex; align-items: center; gap: 13px; width: 100%; min-width: 0; padding: 7px; border: 2px solid #24153c; border-radius: 13px; background: #fff0b0; color: #24153c; text-align: left; }
.rmArt { display: flex; align-items: center; justify-content: center; flex: none; overflow: hidden; background: #f0e5d1; border: 2px solid #24153c; border-radius: 12px; }
.rmLeader > .rmArt { width: 84px; height: 84px; background: #24153c; }
.rmArt > canvas, .rmArt > img, .rmArt > svg { display: block; width: 100%; height: 100%; object-fit: contain; }
/* The shared leader helper returns a wrapper; result portraits must not depend on the lazy chest-show stylesheet. */
.rmArt > .ccsLeaderArt { width: 100%; height: 100%; }
.rmArt > .ccsLeaderArt > img, .rmArt > .ccsLeaderArt > svg { display: block; width: 100%; height: 100%; object-fit: contain; }
.rmArtFallback { color: #fff8e7; font: 400 30px/1 'Bangers', Impact, sans-serif; text-shadow: 0 2px 0 #24153c; }
.rmLeaderCaption { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.rmLeaderLabel { font: 900 10px/1 'Nunito', system-ui, sans-serif; color: #62426c; letter-spacing: 1px; }
.rmLeaderName { font: 400 27px/1.05 'Bangers', Impact, sans-serif; letter-spacing: .6px; overflow-wrap: anywhere; }
.rmLevel { display: inline-block; border-radius: 6px; padding: 3px 6px; background: #24153c; color: #fff9e9; font: 900 10px/1.2 'Nunito', system-ui, sans-serif; letter-spacing: .3px; }
.rmInspectHint { font: 900 10px/1.2 'Nunito', system-ui, sans-serif; color: #62426c; }
.rmTraining { display: flex; flex-wrap: wrap; gap: 5px; margin: 9px 0 0; }
.rmTrainingSkill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px; border: 1px solid #b9a8c5; border-radius: 7px; background: #eee6f6; color: #49345a; font: 900 9px/1.2 'Nunito', system-ui, sans-serif; }
.rmTrainingSkill b { min-width: 17px; padding: 2px; border-radius: 4px; background: #4c2674; color: #fff; text-align: center; font-size: 12px; }
.rmHeroes { display: grid; grid-template-columns: repeat(var(--rm-cards,5), minmax(0, 1fr)); gap: 5px; margin-top: 11px; }
.rmHero { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; width: 100%; min-width: 0; min-height: 106px; padding: 5px 2px; border: 2px solid #24153c; border-radius: 9px; background: #fffdf5; color: #24153c; text-align: center; box-shadow: 0 3px 0 #24153c20; }
.rmHero > .rmArt { width: min(100%,56px); height: auto; aspect-ratio: 1; border-radius: 8px; }
.rmHeroName { font: 400 12px/1.1 'Bangers', Impact, sans-serif; letter-spacing: .2px; overflow-wrap: anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden; }
.rmHero .rmLevel { margin-top: auto; font-size: 9px; }
.rmHeroInspect { color: #62426c; font: 900 8px/1 'Nunito', system-ui, sans-serif; letter-spacing: .7px; }
.rmInspect { cursor: pointer; -webkit-tap-highlight-color: transparent; }
/* W340 E-022: six cards on a 360 px phone are 40 px wide; the touch area reaches 46 px through 3 px on each side (inside the 5 px gap, a
   1 px seam at most) - the card itself does not grow, so the row never overflows */
.rmInspect { position: relative; }
.rmInspect::after { content: ''; position: absolute; top: 0; bottom: 0; left: -3px; right: -3px; }
.rmInspect:focus-visible { outline: 3px solid #087e98; outline-offset: 3px; }
.rmInspect:active { background: #ffedaa; }
.rmBoardRecap { margin-top: 12px; border: 2px solid #24153c; border-radius: 11px; background: #ece5fa; overflow: hidden; }
.rmBoardSummary { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 10px; color: #24153c; cursor: pointer; list-style: none; }
.rmBoardSummary::-webkit-details-marker { display: none; }
.rmBoardSummary::after { content: '+'; flex: none; margin-left: auto; font: 900 24px/1 system-ui,sans-serif; }
.rmBoardRecap[open] > .rmBoardSummary::after { content: '−'; }
.rmBoardSummary:focus-visible, .rmBoardViewport:focus-visible { outline: 3px solid #087e98; outline-offset: -3px; }
.rmBoardGlyph { display: grid; grid-template-columns: repeat(3,6px); gap: 2px; flex: none; padding: 5px; border: 2px solid #24153c; border-radius: 7px; background: #ffd23f; transform: rotate(-5deg); }
.rmBoardGlyph i { width: 6px; height: 6px; border: 1px solid #24153c; border-radius: 1px; background: #fff9e9; }
.rmBoardGlyph i:nth-child(2n) { background: #55b8ed; }
.rmBoardLabel { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.rmBoardLabel strong { font: 400 19px/1.1 'Bangers',Impact,sans-serif; letter-spacing: .7px; }
.rmBoardLabel > span { font: 900 9px/1.3 'Nunito',system-ui,sans-serif; overflow-wrap: anywhere; }
.rmBoardViewport { max-width: 100%; margin: 0 7px; overflow-x: auto; overscroll-behavior-x: contain; border-radius: 7px; background: #24153c; }
.rmBoardGrid { display: grid; grid-template-columns: repeat(var(--rm-board-cols,5),minmax(44px,1fr)); gap: 4px; min-width: min-content; padding: 5px; }
.rmBoardHero, .rmBoardEmpty { position: relative; display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 52px; padding: 0; border: 1px solid #fff9e966; border-radius: 6px; background: #594475; color: #fff9e9; }
.rmBoardHero { cursor: pointer; }
.rmBoardHero > .rmArt { width: 100%; height: 50px; border: 0; border-radius: 5px; background: transparent; }
.rmBoardHero.rmInspect::after { content: none; }
.rmBoardEmpty { background: #392a50; border-style: dashed; opacity: .7; }
.rmBoardVoid { display: block; min-width: 44px; min-height: 52px; }
.rmBoardRank { position: absolute; right: 2px; bottom: 2px; min-width: 22px; padding: 2px 3px; border: 1px solid #24153c; border-radius: 5px; background: #ffd23f; color: #24153c; font: 900 10px/1 'Nunito',system-ui,sans-serif; }
#over #resultJourneyMatchup .rmBoardNote { margin: 7px 9px 9px; color: #49345a; font: 800 10px/1.4 'Nunito',system-ui,sans-serif; }
.rmVersus { display: flex; align-items: center; justify-content: center; min-height: 38px; }
.rmVersus span { display: flex; align-items: center; justify-content: center; width: 52px; height: 40px; border: 3px solid #24153c; border-radius: 7px; background: #ffd23f; color: #4c2674; box-shadow: 3px 3px 0 #24153c; transform: skew(-9deg); font: 400 29px/1 'Bangers', Impact, sans-serif; letter-spacing: 1px; }
/* W340 E-014 (tablet and fold): the side-by-side duel asked the WINDOW for 780 px, but the result card lives in the 460 px play column
   (widescreen.css --cc-col-w), so on a tablet or an open fold it squeezed both lineups into 10 px cards and wrote the leader's name down the
   middle one letter at a time. It now asks the matchup's own box (a container query): the card keeps the phone stack in the column, and
   would only go side by side if the column itself were ever 780 px wide. (A browser without container queries keeps the phone stack.) */
#resultJourneyMatchup { container-type: inline-size; container-name: rmbox; }
@container rmbox (min-width: 780px) {
  .rmMatchup.rmDuel { grid-template-columns: minmax(0, 1fr) 58px minmax(0, 1fr); gap: 12px; align-items: stretch; }
  .rmMatchup.rmMany { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 359px) {
  .rmPanel { padding: 10px 8px; }
  .rmHeroes { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .rmHero { min-height:94px; }
  .rmLeader { gap: 9px; }
  .rmLeader > .rmArt { width: 70px; height: 70px; }
  .rmLeaderName { font-size: 24px; }
  .rmHeroName { font-size: 11px; }
}
/* W348 (E-022 follow-up, W329 finding): on a narrow phone the six rival cards were 40 px wide boxes, held to 44 px only by a touch band that overlapped
   its neighbours. The result card, its body and the panel now give a little side room back, so every card is a real 44 px box and the band goes. */
.rmHero.rmInspect::after { content: none; }
@media (max-width: 420px) {
  #over[data-result-phase] .overCard { padding-left: 8px; padding-right: 8px; }
  #over[data-result-phase] #overBody { padding-left: 0; padding-right: 0; }
  .rmPanel { padding: 9px; }
  .rmHeroes { gap: 3px; }
}
