/* Match Report (reading): the pitch (the replay) on the left, on top on a tall screen; the newspaper
   story, the question and the answer cards on the right. Everything he taps is at least 80px. */
.game.matchreport { background: linear-gradient(170deg, #e4f3ff, #fff7e4 55%, #e9f9e6); }
.matchreport button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.matchreport .game-top { padding-top: 5px; padding-bottom: 5px; }
.matchreport .mr-back { min-height: 60px; min-width: 60px; white-space: nowrap; }
.matchreport .hud .mr-score { display: inline-flex; align-items: center; padding: 2px 10px; }
.matchreport .mr-score.tick { animation: mr-tick .9s ease-out; }
@keyframes mr-tick { 30% { transform: scale(1.25); background: #fff3a8; } }

/* a scoreboard: our badge, the score, theirs */
.matchreport .mr-sb { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.matchreport .mr-sb em { font-style: normal; opacity: .6; }
.matchreport .mr-sbb { width: 1.3em; height: 1.45em; flex: none; }

.matchreport .mr-body {
  flex: 1; min-height: 0; position: relative; display: grid; align-items: center; gap: 14px 22px;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.1fr);
  padding: 12px max(16px, env(safe-area-inset-right, 0px)) 14px max(16px, env(safe-area-inset-left, 0px));
}
.matchreport .mr-body.waiting .mr-read { visibility: hidden; }

/* ---------- the pitch ---------- */
.matchreport .mr-tv { min-width: 0; }
.matchreport .mr-pitch {
  position: relative; width: 100%; aspect-ratio: 16 / 10; container-type: size; overflow: hidden;
  border: 4px solid var(--ink); border-radius: 22px; box-shadow: var(--shadow);
  background: repeating-linear-gradient(90deg, #5cbf5a 0 10%, #4fb04e 10% 20%);
}
.matchreport .mr-lines { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: rgba(255, 255, 255, .8); stroke-width: .8; vector-effect: non-scaling-stroke; }
.matchreport .mr-lines * { vector-effect: non-scaling-stroke; stroke-width: 3px; }
.matchreport .mr-goal {
  position: absolute; top: 33%; height: 34%; width: 4.5%; border: 3px solid #fff; z-index: 1;
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .55) 0 2px, transparent 2px 7px), repeating-linear-gradient(-45deg, rgba(255, 255, 255, .55) 0 2px, transparent 2px 7px), rgba(0, 0, 0, .12);
}
.matchreport .mr-goal.l { left: 0; border-left: 0; }
.matchreport .mr-goal.r { right: 0; border-right: 0; }
.matchreport .mr-goal.shake { animation: mr-net .7s ease-out; }
@keyframes mr-net { 20% { transform: scaleY(1.12) translateX(3px); } 45% { transform: scaleY(.95); } }
.matchreport .mr-gk { position: absolute; right: 1%; top: 50%; height: 36cqh; aspect-ratio: 170 / 185; transform: translateY(-62%); z-index: 2; transition: transform .45s ease-out; }
.matchreport .mr-gk svg { display: block; width: 100%; height: 100%; }
.matchreport .mr-gk.beat { transform: translateY(-20%) rotate(28deg); }
.matchreport .mr-actors { position: absolute; inset: 0; z-index: 3; }
.matchreport .mr-pl {
  position: absolute; width: 25cqh; height: 25cqh; transform: translate(-50%, -100%);
  transition: left .55s ease-in-out, top .55s ease-in-out; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .18));
}
.matchreport .mr-pl svg { display: block; width: 100%; height: 100%; }
.matchreport .mr-pl.hop svg { animation: mr-hop .45s ease-in-out 3; }
.matchreport .mr-pl.snooze svg { animation: mr-snooze 1.3s ease-in-out; }
.matchreport .mr-pl.slip svg { transform: rotate(80deg) translate(10%, 10%); transition: transform .3s; }
.matchreport .mr-pl.catch svg { animation: mr-hop .4s ease-out; }
.matchreport .mr-pl.dive svg { transform: rotate(-70deg) translate(-10%, -10%); transition: transform .35s; }
.matchreport .mr-pl.them { transition-duration: .7s; }
@keyframes mr-hop { 50% { transform: translateY(-22%); } }
@keyframes mr-snooze { 50% { transform: rotate(-12deg) scale(.95); } }
.matchreport .mr-prop { position: absolute; right: -14%; top: -18%; font-size: 13cqh; line-height: 1; animation: mr-pop .4s cubic-bezier(.2, 1.6, .4, 1); }
.matchreport .mr-mud { position: absolute; left: 0; right: 0; bottom: -6%; height: 22%; border-radius: 50%; background: #7a5230; opacity: .85; z-index: -1; animation: mr-pop .3s ease-out; }
.matchreport .mr-ball {
  position: absolute; width: 8cqh; height: 8cqh; transform: translate(-50%, -50%); z-index: 4; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #3a2a4a 0 18%, transparent 19%), radial-gradient(circle at 15% 25%, #3a2a4a 0 10%, transparent 11%),
    radial-gradient(circle at 85% 25%, #3a2a4a 0 10%, transparent 11%), radial-gradient(circle at 50% 95%, #3a2a4a 0 12%, transparent 13%), #fff;
  border: 2px solid var(--ink); transition: left .45s ease-out, top .45s ease-out, opacity .3s;
}
.matchreport .mr-ball.shot { transition-duration: .42s; }
.matchreport .mr-ball.gone { opacity: 0; }
.matchreport .mr-flash {
  position: absolute; left: 50%; top: 40%; z-index: 6; transform: translate(-50%, -50%) scale(0); pointer-events: none; opacity: 0; white-space: nowrap;
  font-size: 22cqh; font-weight: 900; color: #fff; -webkit-text-stroke: 3px var(--ink); paint-order: stroke; text-shadow: 0 5px 0 rgba(0, 0, 0, .25);
}
.matchreport .mr-flash.show { animation: mr-flash 1.2s ease-out forwards; }
@keyframes mr-flash { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.3); } 25% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); } 75% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -60%) scale(1); } }
@keyframes mr-pop { from { transform: scale(0); } to { transform: none; } }

/* ---------- the newspaper story ---------- */
.matchreport .mr-read { min-width: 0; width: 100%; max-width: 680px; justify-self: center; display: flex; flex-direction: column; gap: 12px; }
.matchreport .mr-paper {
  position: relative; padding: 6px 18px 14px; background: #fffdf4; border: 4px solid var(--ink); border-radius: 18px; box-shadow: var(--shadow);
  background-image: linear-gradient(transparent 0 0);
}
.matchreport .mr-paper.pop { animation: mr-paper .4s ease-out; }
.matchreport .mr-paper.nudge { animation: mr-wiggle .5s ease-in-out 2; }
@keyframes mr-paper { from { transform: translateY(8px) rotate(-1deg); opacity: .4; } }
@keyframes mr-wiggle { 25% { transform: rotate(-1.5deg); } 75% { transform: rotate(1.5deg); } }
.matchreport .mr-mast {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-bottom: 4px; border-bottom: 4px double var(--ink);
  font-family: Georgia, 'Times New Roman', serif; font-weight: 900; font-size: 15px; letter-spacing: .12em; color: var(--ink);
}
.matchreport .mr-dots { display: flex; gap: 5px; }
.matchreport .mr-dots i { width: 13px; height: 13px; border-radius: 50%; border: 2.5px solid var(--ink); background: #fff; }
.matchreport .mr-dots i.on { background: var(--grape); }
.matchreport .mr-dots i.now { background: var(--sun); animation: mr-pulse .9s ease-in-out infinite; }
@keyframes mr-pulse { 50% { transform: scale(1.25); } }
.matchreport .mr-story { margin: 8px 0 0; font-size: clamp(26px, 2.8vw, 40px); font-weight: 700; line-height: 1.42; color: var(--ink); word-spacing: .14em; overflow-wrap: anywhere; }
.matchreport .mr-s { border-radius: 8px; animation: mr-in .35s ease-out both; transition: background .25s, box-shadow .25s; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
@keyframes mr-in { from { opacity: 0; } }
.matchreport .mr-s.hl { background: #ffe27a; box-shadow: 0 0 0 4px #ffe27a; animation: mr-glow .9s ease-in-out 2; }
.matchreport .mr-s.found { background: #c9f5d5; box-shadow: 0 0 0 4px #c9f5d5; }
.matchreport .mr-s.now { background: #fff1b8; box-shadow: 0 0 0 4px #fff1b8; }
@keyframes mr-glow { 50% { background: #ffd23f; box-shadow: 0 0 0 7px #ffd23f; } }

/* the question */
.matchreport .mr-q { display: flex; align-items: center; gap: 10px; min-height: 76px; padding: 6px 8px 6px 18px; background: #fff; border: 4px solid var(--ink); border-radius: 26px; box-shadow: var(--shadow); }
.matchreport .mr-qtext { flex: 1; min-width: 0; margin: 0; font-size: clamp(25px, 2.5vw, 36px); font-weight: 700; line-height: 1.2; color: var(--grape); word-spacing: .1em; }
.matchreport .mr-hear {
  flex: none; width: 64px; height: 64px; padding: 0; border-radius: 50%; border: 4px solid var(--ink); background: #fff8d6;
  font-size: 30px; line-height: 1; box-shadow: 0 4px 0 rgba(58, 42, 74, .25); cursor: pointer;
}
.matchreport .mr-hear:active:not(:disabled) { transform: scale(.92); }
.matchreport .mr-hear:disabled { opacity: .45; }

/* the answer cards */
.matchreport .mr-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.matchreport .mr-cards.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.matchreport .mr-card {
  position: relative; font: inherit; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  height: clamp(110px, 21vh, 170px); min-width: 0; padding: 6px; color: var(--ink); background: #fff; cursor: pointer;
  border: 4px solid var(--ink); border-radius: 22px; box-shadow: var(--shadow); opacity: .35; transition: transform .15s, background .2s, opacity .2s;
}
.matchreport .mr-card.show { opacity: 1; }
.matchreport .mr-card:active:not(:disabled) { transform: scale(.95); }
@media (hover: hover) { .matchreport .mr-card.show:hover:not(:disabled) { background: #fff8d6; } }
.matchreport .mr-card:disabled { cursor: default; }
.matchreport .mr-card.ok { background: #dcf8e3; box-shadow: 0 0 0 5px var(--good), var(--shadow); transform: scale(1.04); }
.matchreport .mr-card.bad { background: #ffe1e3; opacity: .75; animation: mr-shake .4s; }
.matchreport .mr-card.pulse { animation: mr-pulse .9s ease-in-out infinite; }
@keyframes mr-shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.matchreport .mr-pic { flex: 1; min-height: 0; width: 100%; display: grid; place-items: center; }
.matchreport .mr-pic svg { display: block; height: 100%; width: auto; max-width: 100%; }
.matchreport .mr-lbl { display: none; font-size: 22px; font-weight: 700; line-height: 1.1; }
.matchreport .mr-lbl.show { display: block; }
.matchreport .mr-card.bad .mr-lbl { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); padding: 0 10px; color: #a33; background: #fff; border: 3px solid #e7a3a8; border-radius: 12px; white-space: nowrap; }
.matchreport .mr-yn { font-size: clamp(44px, 7vh, 64px); line-height: 1; }
.matchreport .yes .mr-lbl { font-size: clamp(28px, 3vw, 38px); }
.matchreport .score .mr-sb { font-size: clamp(26px, 2.6vw, 38px); gap: 4px; }

/* ---------- the start card, the front page ---------- */
.matchreport .mr-start, .matchreport .mr-front { position: absolute; inset: 0; z-index: 12; display: none; place-items: center; padding: 14px; overflow: auto; background: rgba(40, 20, 70, .35); }
.matchreport .mr-start.show, .matchreport .mr-front.show { display: grid; }
.matchreport .mr-start-card {
  width: min(580px, 100%); display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px 20px 16px; text-align: center;
  background: #fff; border: 4px solid var(--ink); border-radius: 28px; box-shadow: var(--shadow);
}
.matchreport .mr-start-card h3 { margin: 0; font-size: 28px; color: var(--grape); }
.matchreport .mr-teams { display: flex; align-items: center; justify-content: center; gap: 14px; }
.matchreport .mr-team { display: flex; flex-direction: column; align-items: center; gap: 2px; font-weight: 800; font-size: 16px; max-width: 170px; }
.matchreport .mr-tbadge { width: 64px; height: 72px; }
.matchreport .mr-vs { font-size: 22px; color: var(--ink-soft); }
.matchreport .mr-squad { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.matchreport .mr-squad span { width: 64px; height: 64px; }
.matchreport .mr-squad svg { display: block; width: 100%; height: 100%; }
.matchreport .mr-go { font-size: 30px; min-height: 76px; padding: 10px 46px; }
.matchreport .mr-best, .matchreport .mr-now { margin: 0; font-size: 16px; font-weight: 700; color: var(--ink-soft); }
.matchreport .mr-now .rd-word { font-size: 19px; color: var(--ink); }
.matchreport .mr-off { margin: 0; font-weight: 700; color: var(--coral-dark); }
.matchreport .mr-off .btn { min-height: 48px; }

.matchreport .mr-news {
  width: min(720px, 100%); padding: 10px 22px 16px; text-align: center; color: var(--ink);
  background: #fffdf4; border: 4px solid var(--ink); border-radius: 10px; box-shadow: var(--shadow); animation: mr-spin .6s ease-out;
}
@keyframes mr-spin { from { transform: rotate(-200deg) scale(.2); opacity: 0; } }
.matchreport .mr-nmast { font-family: Georgia, 'Times New Roman', serif; font-size: clamp(30px, 5vw, 46px); font-weight: 900; letter-spacing: .04em; line-height: 1.1; }
.matchreport .mr-nline { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; margin-top: 4px; border-top: 2px solid var(--ink); border-bottom: 4px double var(--ink); font-family: Georgia, serif; font-size: 14px; font-weight: 700; }
.matchreport .mr-nhead { margin: 10px 0 4px; font-family: Georgia, serif; font-size: clamp(26px, 4vw, 38px); font-weight: 900; line-height: 1.1; text-transform: uppercase; }
.matchreport .mr-nscore .mr-sb { font-size: 34px; }
.matchreport .mr-reports { list-style: none; margin: 10px 0 12px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; text-align: left; }
.matchreport .mr-reports li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 2px solid #d8cfe6; border-radius: 12px; background: #fff; min-width: 0; }
.matchreport .mr-reports li.star { border-color: #f2c94c; background: #fffbe8; }
.matchreport .mr-rpic { flex: none; width: 50px; height: 50px; }
.matchreport .mr-rpic svg { display: block; width: 100%; height: 100%; }
.matchreport .mr-rtext { flex: 1; min-width: 0; font-size: 18px; font-weight: 700; line-height: 1.25; }
.matchreport .mr-rok { flex: none; font-size: 20px; }
.matchreport .mr-done { font-size: 26px; min-height: 72px; padding: 8px 40px; }

/* new sounds learned */
.matchreport .mr-banner {
  position: absolute; left: 50%; top: 18px; z-index: 11; transform: translateX(-50%) scale(0); opacity: 0; pointer-events: none; white-space: nowrap;
  background: var(--sun); color: var(--ink); border: 4px solid var(--ink); border-radius: 22px; box-shadow: var(--shadow); padding: 6px 22px; font-size: 30px; font-weight: 800;
}
.matchreport .mr-banner .rd-word { background: #fff; border: 3px solid var(--ink); border-radius: 12px; padding: 0 10px; }
.matchreport .mr-banner.show { animation: mr-banner 2.8s ease-out forwards; }
@keyframes mr-banner { 10% { opacity: 1; transform: translateX(-50%) scale(1.1); } 20%, 85% { opacity: 1; transform: translateX(-50%) scale(1); } 100% { opacity: 0; transform: translateX(-50%) scale(1); } }

/* ---------- a tall screen (an iPad held up, a phone): pitch on top ---------- */
@media (max-aspect-ratio: 1/1) {
  .matchreport .mr-body { grid-template-columns: minmax(0, 1fr); align-content: start; align-items: start; gap: 12px; }
  .matchreport .mr-pitch { aspect-ratio: 2 / 1; width: min(100%, 50vh); margin: 0 auto; }
  .matchreport .mr-read { max-width: 760px; }
  .matchreport .mr-story { font-size: clamp(24px, 4.4vw, 40px); }
  .matchreport .mr-qtext { font-size: clamp(23px, 4vw, 36px); }
  .matchreport .mr-card { height: clamp(110px, 18vh, 180px); }
}
@media (max-width: 560px) {
  .matchreport .game-top { gap: 6px; }
  .matchreport .game-top h2 { font-size: 19px; white-space: nowrap; }
  .matchreport .mr-back span { display: none; }
  .matchreport .hud { font-size: 18px; }
  .matchreport .hud .mr-score { padding: 1px 8px; }
  .matchreport .mr-body { padding-top: 8px; padding-bottom: 10px; gap: 10px; }
  .matchreport .mr-read { gap: 10px; }
  .matchreport .mr-pitch { border-width: 3px; border-radius: 16px; }
  .matchreport .mr-paper { padding: 4px 12px 10px; border-radius: 14px; }
  .matchreport .mr-mast { font-size: 12px; }
  .matchreport .mr-dots i { width: 11px; height: 11px; border-width: 2px; }
  .matchreport .mr-q { min-height: 68px; padding-left: 14px; border-radius: 22px; }
  .matchreport .mr-hear { width: 58px; height: 58px; font-size: 26px; }
  .matchreport .mr-cards { gap: 8px; }
  .matchreport .mr-card { border-width: 3px; border-radius: 18px; }
  /* the score cards: each badge over its number */
  .matchreport .score .mr-sb { display: grid; grid-template-columns: auto auto auto; align-items: center; justify-items: center; gap: 0 4px; font-size: 32px; line-height: 1.1; }
  .matchreport .score .mr-sb > :nth-child(1) { grid-area: 1 / 1; }
  .matchreport .score .mr-sb > :nth-child(2) { grid-area: 2 / 1; }
  .matchreport .score .mr-sb > :nth-child(3) { grid-area: 2 / 2; }
  .matchreport .score .mr-sb > :nth-child(4) { grid-area: 2 / 3; }
  .matchreport .score .mr-sb > :nth-child(5) { grid-area: 1 / 3; }
  .matchreport .score .mr-sbb { width: 1.05em; height: 1.2em; }
  .matchreport .mr-lbl { font-size: 19px; }
  .matchreport .mr-reports { grid-template-columns: minmax(0, 1fr); }
  .matchreport .mr-news { padding: 8px 12px 12px; }
  .matchreport .mr-go { font-size: 26px; padding: 8px 34px; }
  .matchreport .mr-banner { font-size: 22px; }
}
@media (max-width: 400px) { .matchreport .game-top h2 span { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .matchreport .mr-pl, .matchreport .mr-ball { transition-duration: .2s; }
  .matchreport .mr-dots i.now, .matchreport .mr-card.pulse { animation: none; }
}
