/* Scoped 3v3 view: no PK selectors, dimensions, or animations changed. */
.three-screen .three-score { grid-column: 2; grid-row: 1; text-align: center; font-size: clamp(24px, 2.8vw, 28px); line-height: 1.05; font-weight: 900; color: #fff; margin: 0; white-space: nowrap; font-variant-numeric: tabular-nums; }
body[data-mode="three"] .scoreboard,
body[data-mode="three"] .quick-restart-button,
body[data-mode="three"] .home-button,
body[data-mode="three"] .scene { display: none; }
.three-screen[hidden] { display: none; }
.three-broadcast-scoreboard { position: absolute; top: -24px; left: 50%; transform: translateX(-50%); z-index: 1500; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); column-gap: clamp(8px, 1.8vw, 18px); row-gap: 2px; width: max-content; max-width: calc(100% - 12px); padding: 4px clamp(8px, 1.5vw, 14px); border: 1px solid #a9bed32e; border-radius: 7px; background: #071322db; box-shadow: 0 3px 10px #0003; text-align: center; pointer-events: none; }
.three-scoreboard-home, .three-scoreboard-away { grid-row: 1 / 3; align-self: center; min-width: 0; color: #edf2f8; font-size: clamp(12px, 1.4vw, 14px); line-height: 1.3; font-weight: 600; }
.three-scoreboard-home { grid-column: 1; }
.three-scoreboard-away { grid-column: 3; }
.three-match-clock { grid-column: 2; grid-row: 2; margin: 0; text-align: center; color: #fff; line-height: 1; }
.three-match-time { display: inline-block; min-width: 5ch; margin: 0; color: #fff; font: bold clamp(14px, 1.6vw, 16px)/1 monospace; font-variant-numeric: tabular-nums; }
@media (max-width: 540px) {
  .three-broadcast-scoreboard { padding: 3px 8px; }
  .three-screen .three-score { font-size: 24px; }
  .three-match-time { font-size: 14px; }
}
.three-match-result[hidden] { display: none; }
.three-match-result { position: absolute; inset: 0; z-index: 2300; display: grid; place-items: center; padding: clamp(8px, 2vw, 20px); overflow: hidden; background: #071820b8; color: #ffe3a0; text-align: center; }
.three-result-card { position: relative; isolation: isolate; width: min(100%, 360px); max-height: 100%; min-height: 0; overflow: auto; padding: clamp(12px, 2vw, 24px); border: 1px solid #9bb3b077; border-radius: 14px; background: #10252af5; box-shadow: 0 16px 50px #0006; }
.three-match-result h3 { margin: 0 0 8px; font-size: clamp(23px, 4vw, 34px); }
.three-result-caption { margin: 0 0 8px; color: #b8c8c5; font-size: 10px; letter-spacing: 2px; }
.three-result-score { margin: 6px 0; color: #f3ead5; font-size: clamp(14px, 2.5vw, 21px); font-weight: bold; }
.three-result-duration { margin: 8px 0 14px; color: #b8c8c5; font-size: 12px; }
.three-result-time { font-variant-numeric: tabular-nums; }
.three-result-actions { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.three-result-home { padding: 10px; border: 1px solid #9bb3b088; border-radius: 8px; background: #17363c; color: #eee7d4; font: inherit; font-size: 13px; cursor: pointer; }
.three-result-actions button { min-width: 0; }
.three-result-actions button:focus-visible { outline: 2px solid #ffe4a1; outline-offset: 2px; }
.three-match-result[data-outcome="win"] .three-result-card { border-color: #d2ae57; }
.three-match-result[data-outcome="win"] .three-result-outcome { color: #ffdb73; text-shadow: 0 0 18px #ffd45a55; }
.three-match-result[data-outcome="lose"] .three-result-outcome { color: #edb2aa; }
.three-match-result[data-outcome="draw"] .three-result-outcome { color: #cde2e8; }
.three-match-result[data-outcome="win"] .three-result-card::before { content: "✦　✧　　　　　✦　✧"; position: absolute; inset: 8px 0; z-index: -1; pointer-events: none; color: #ffdb73; font-size: 22px; opacity: .25; animation: three-result-gold 1.4s ease-out both; }
@keyframes three-result-gold { 0% { opacity: 0; } 40% { opacity: .65; } 100% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .three-match-result .three-result-card::before { animation: none; } }
.three-play-again { padding: 10px 20px; border: 1px solid #f3dcaa; border-radius: 8px; background: #e3c47b; color: #12283a; font: inherit; font-weight: bold; cursor: pointer; }
.three-screen { padding: clamp(14px, 3vw, 28px); border: 1px solid #c9ab6266; border-radius: 18px; background: radial-gradient(ellipse at top, #213e50, transparent 65%), #0c1c30; box-shadow: 0 24px 55px #0005; }
.three-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.three-kicker { color: #d9bd7e; font-size: 10px; letter-spacing: 2px; margin: 0 0 8px; }
.three-heading h2 { margin: 0; color: #fff1cc; font-size: clamp(28px, 5vw, 44px); font-weight: 900; letter-spacing: 3px; }
.three-heading h2 span { color: #d8b566; font-size: .65em; }
.three-subtitle { color: #b6c7ce; font-size: 12px; margin: 8px 0 0; }
.three-home { border: 1px solid #c5a65f99; border-radius: 8px; color: #ffe3a0; background: #152d46; padding: 12px 16px; font: inherit; font-size: 13px; cursor: pointer; }
.three-home:hover { background: #26425b; }
.three-home:focus-visible { outline: 2px solid #ffe09a; outline-offset: 4px; }
.three-heading-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.three-restart, .three-start { padding: 12px 16px; border: 1px solid #c5a65f99; border-radius: 8px; background: #152d46; color: #ffe3a0; font: inherit; font-size: 13px; cursor: pointer; }
.three-start { background: #e3c47b; color: #12283a; font-weight: bold; }
.three-start:disabled { opacity: .45; cursor: not-allowed; }
.three-restart:focus-visible, .three-start:focus-visible { outline: 2px solid #ffe09a; outline-offset: 4px; }
.three-setup { margin-top: 22px; padding: 18px; border: 1px solid #c5a65f66; border-radius: 12px; background: #142d40; }
.three-setup[hidden] { display: none; }
.three-setup fieldset { display: flex; flex-wrap: wrap; gap: 16px; padding: 12px; border: 1px solid #69818b66; }
.three-setup legend { padding: 0 6px; color: #ffe3a0; font-weight: bold; }
.three-setup label { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.three-setup input { accent-color: #e3c47b; }
.three-setup p { color: #b6c7ce; font-size: 12px; line-height: 1.7; }
.three-action-status { min-height: 1.6em; color: #ffe3a0; font-size: 12px; line-height: 1.6; }
.three-tackling .three-shirt { outline: 2px solid #fff0b8; outline-offset: 2px; }
.three-tackle-effect { --tackle-color: #fff0af; display: none; position: absolute; inset: 0; transform: rotate(var(--tackle-angle, 0rad)); pointer-events: none; }
.three-kick-visual .three-tackle-effect { display: block; }
.three-tackle-foot { position: absolute; top: calc(50% - 3px); left: 62%; width: clamp(12px, 2vw, 21px); height: 6px; border: 1px solid #1d3342; border-radius: 3px 6px 6px 3px; background: var(--tackle-color); box-shadow: 0 1px 3px #0008; transform-origin: left center; animation: three-tackle-poke .26s ease-out both; }
.three-player[data-tackle-feedback="success"] .three-tackle-effect { --tackle-color: #71f2a4; }
.three-player[data-tackle-feedback="failed"] .three-tackle-effect { --tackle-color: #ff8e83; }
.three-player[data-tackle-feedback="blocked"] .three-tackle-effect { --tackle-color: #ffbd6e; }
.three-player[data-tackle-feedback="blocked"] .three-tackle-foot { animation-name: three-tackle-blocked; }
@keyframes three-tackle-poke { 0% { opacity: .5; transform: scaleX(.2); } 55%, 68% { opacity: 1; transform: scaleX(1) translateX(2px); } 100% { opacity: 0; transform: scaleX(.2); } }
@keyframes three-tackle-blocked { 0% { opacity: 0; transform: scaleX(.2); } 35%, 65% { opacity: 1; transform: scaleX(.45); } 100% { opacity: 0; transform: scaleX(.2); } }
.three-player.three-pressured .three-shirt { outline: 2px solid rgb(255 153 52 / var(--body-pressure, 0)); outline-offset: 2px; }
.three-football.three-loose { box-shadow: 0 0 0 2px #ffd47699, 0 0 9px #ffd476; animation: three-loose-flash .35s ease-out; }
@keyframes three-loose-flash { 35% { box-shadow: 0 0 0 4px #ffd47688, 0 0 14px #ffd476; } }
.three-teams { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: 26px 0 16px; font-size: 13px; color: #e5edf3; }
.three-teams > span { display: inline-flex; align-items: center; gap: 8px; }
.three-teams small { color: #9fb7c6; font-size: 9px; }
.three-teams i { width: 9px; height: 9px; border-radius: 50%; background: #75caff; box-shadow: 0 0 10px #62bdff66; }
.three-teams .three-opponent i { background: #ef9479; box-shadow: 0 0 10px #e6856266; }
.three-teams .three-phase { border: 1px solid #c4a66455; padding: 6px 10px; border-radius: 20px; color: #d9c08a; font-size: 10px; }
.three-stadium { padding: clamp(27px, 4vw, 40px) clamp(18px, 4vw, 40px); border: 1px solid #456264; border-radius: 12px; background: repeating-linear-gradient(90deg, #132b36 0 5px, #172f3b 5px 9px); box-shadow: inset 0 0 35px #0009; }
.three-field { position: relative; isolation: isolate; width: 100%; aspect-ratio: 25 / 16; border: 2px solid #d9eee0ba; background: repeating-linear-gradient(90deg, #28694c 0% 10%, #307554 10% 20%); box-shadow: 0 0 0 8px #204e3d, 0 0 0 9px #adc8ad33, 0 12px 30px #0007; }
.three-field:focus-visible { outline: 2px solid #e6c778; outline-offset: 12px; }
.three-goal::before { content: ""; position: absolute; inset: -5px -1px 4px; border: 2px solid #f4f5e2; border-bottom-color: #d7dfd8; background: #c8ddd011; box-shadow: 0 5px 0 #bacbbd55; pointer-events: none; }
.three-markings, .three-actors { position: absolute; inset: 0; pointer-events: none; }
.three-markings { overflow: hidden; opacity: .75; }
.three-markings > span { position: absolute; border: 2px solid #dceee0; }
.three-markings .three-midline { left: 50%; top: 0; bottom: 0; border-width: 0 0 0 2px; }
.three-markings .three-circle { left: 50%; top: 50%; width: 24%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); }
.three-markings .three-center-dot { left: 50%; top: 50%; width: 5px; height: 5px; background: #e3eee0; border: 0; border-radius: 50%; transform: translate(-50%, -50%); }
.three-box { top: 23%; height: 54%; width: 17%; }
.three-box-left, .three-six-left { left: -2px; }
.three-box-right, .three-six-right { right: -2px; }
.three-six { top: 36%; height: 28%; width: 7%; }
.three-goal { position: absolute; top: 39%; width: 3.5%; height: 22%; border: 2px solid #f2f0db; background: repeating-linear-gradient(0deg, transparent 0 5px, #dce5df55 5px 6px), repeating-linear-gradient(90deg, #c5d2cb22 0 5px, #dce5df55 5px 6px); box-shadow: 0 4px 7px #0005; }
.three-goal-left { right: 100%; border-radius: 3px 0 0 3px; }
.three-goal-right { left: 100%; border-radius: 0 3px 3px 0; }
.three-player { --kit: #63b6ed; --kit-dark: #17558c; position: absolute; width: clamp(23px, 4vw, 39px); height: clamp(23px, 4vw, 39px); transform: translate(-50%, -50%); z-index: 2; text-align: center; color: #fff; }
.three-away { --kit: #ed947a; --kit-dark: #953e37; }
.three-player .three-shirt {
  transform: translateY(var(--run-bob, 0px)) rotate(var(--run-lean, 0deg));
}
/* Only the shirt moves subtly; names, YOU and the selection ring stay stable. */
.three-player::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 4px;
  background: #fff9;
  clip-path: polygon(100% 50%, 0 0, 0 100%);
  transform: translate(-50%, -50%) rotate(var(--run-heading, 0rad)) translateX(clamp(7px, 1.5vw, 14px));
  pointer-events: none;
}
.three-running .three-shirt { will-change: transform; }
.three-shirt::before, .three-shirt::after { content: ""; position: absolute; bottom: -3px; width: 5px; height: 4px; border-radius: 50%; background: #092434; pointer-events: none; opacity: 0; }
.three-shirt::before { left: 18%; transform: translateY(var(--run-step, 0px)); }
.three-shirt::after { right: 18%; transform: translateY(calc(-1 * var(--run-step, 0px))); }
.three-running .three-shirt::before, .three-running .three-shirt::after { opacity: .75; }
.three-football { translate: var(--dribble-x, 0px) var(--dribble-y, 0px); }
@media (prefers-reduced-motion: reduce) {
  .three-player .three-shirt { transform: none; }
  .three-shirt::before, .three-shirt::after { display: none; }
  .three-football { translate: none; }
}
.three-shirt { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 40%; border: 2px solid var(--kit); background: linear-gradient(135deg, var(--kit), var(--kit-dark) 65%); box-shadow: 0 5px 5px #071a2466, inset 0 0 0 2px #fff2; font-size: clamp(10px, 1.6vw, 16px); font-weight: 900; font-variant-numeric: tabular-nums; }
.three-player-name { position: absolute; bottom: calc(100% + 7px); left: 50%; transform: translateX(-50%); min-width: 28px; padding: 2px 5px; border-radius: 3px; background: #071b2dbb; color: #ecf4ed; font-size: clamp(8px, 1.3vw, 11px); font-weight: bold; letter-spacing: 1px; white-space: nowrap; }
.three-player-role { display: none; }
.three-keeper .three-shirt { border-style: double; border-width: 4px; }
.three-selected { z-index: 3; }
.three-selected::before { content: ""; position: absolute; inset: -6px; border: 2px solid #ffe3a0; border-radius: 50%; box-shadow: 0 0 0 3px #e3b85033, 0 0 18px #ffe09866; }
.three-selected .three-player-name { background: #e3c47b; color: #12283a; }
.three-selection-arrow { display: none; position: absolute; bottom: calc(100% + 29px); left: 50%; transform: translateX(-50%); color: #ffe16a; font-size: 15px; line-height: 1; text-shadow: 0 2px 3px #000b; pointer-events: none; }
.three-selected .three-selection-arrow { display: block; }
/* The outer .three-player dimensions/transform remain the collision proxy.
   Only this inset rig rotates or animates; labels and selection stay fixed. */
.three-player { --shorts: #16365c; }
.three-player.three-away { --kit: #e76168; --kit-dark: #a62b40; --shorts: #56243c; }
.three-player::after, .three-player .three-tackle-effect { display: none; }
.three-avatar { position: absolute; inset: 0; transform: rotate(var(--run-heading, 0rad)); transform-origin: center; pointer-events: none; }
.three-avatar::before { content: ""; position: absolute; left: 13%; top: 17%; width: 74%; height: 70%; border-radius: 50%; background: #071b2840; filter: blur(1.5px); }
.three-avatar-rig { position: absolute; inset: 5%; transform: translate(var(--avatar-impact, 0px), calc(var(--avatar-breathe, 0px) + var(--run-bob, 0px))) rotate(var(--run-lean, 0deg)); transform-origin: center; }
.three-player .three-avatar .three-shirt { inset: auto; left: 31%; top: 23%; width: 43%; height: 54%; display: grid; place-items: center; border: 1px solid #143a59; border-radius: 25% 30% 30% 25%; background: linear-gradient(90deg, var(--kit-dark), var(--kit) 65%); box-shadow: inset 0 1px 0 #ffffff70, inset 0 -1px 0 #0003; transform: none; z-index: 3; }
.three-player .three-avatar .three-shirt::before, .three-player .three-avatar .three-shirt::after { content: none; }
.three-avatar-number { display: block; color: #fff9e8; font-size: clamp(6px, 1vw, 9px); line-height: 1; font-weight: 900; font-variant-numeric: tabular-nums; text-shadow: 0 1px 1px #0008; transform: rotate(90deg); }
.three-avatar-head { position: absolute; left: 67%; top: 35%; width: 26%; height: 30%; border: 1px solid #c98c63; border-right: 3px solid #e4b58d; border-radius: 48%; background: #372b29; box-shadow: 0 1px 2px #0005; z-index: 5; }
.three-avatar-arm { position: absolute; left: 29%; width: 37%; height: 18%; border: 1px solid #193a5055; border-radius: 45%; background: linear-gradient(90deg, #ddaa83 0 36%, var(--kit) 38%); transform-origin: 85% center; z-index: 2; }
.three-avatar-arm-left { top: 12%; transform: rotate(calc(12deg + var(--avatar-arm, 0deg))); }
.three-avatar-arm-right { bottom: 12%; transform: rotate(calc(-12deg - var(--avatar-arm, 0deg))); }
.three-avatar-leg { position: absolute; left: 8%; width: 36%; height: 18%; border-radius: 35%; background: linear-gradient(90deg, #17202b 0 25%, #eaf0e6 27% 59%, var(--shorts) 61%); border: 1px solid #132b4155; transform-origin: 90% center; z-index: 1; }
.three-avatar-leg-left { top: 28%; transform: translateX(var(--avatar-step, 0px)); }
.three-avatar-leg-right { bottom: 28%; transform: translateX(calc(-1 * var(--avatar-step, 0px) + var(--avatar-kick, 0px))); }
.three-player[data-player-action] .three-avatar-leg-right { z-index: 4; }
.three-player.three-carrier .three-avatar .three-shirt { box-shadow: inset 0 0 0 1px #fff1a4aa, inset 0 1px 0 #fff8; }
.three-player .three-avatar { will-change: transform; }
.three-avatar-rig { transform: translate(calc(var(--avatar-impact, 0px) + var(--slide-offset, 0px)), calc(var(--avatar-breathe, 0px) + var(--run-bob, 0px))) rotate(calc(var(--run-lean, 0deg) + var(--slide-lean, 0deg))) scaleY(var(--slide-crouch, 1)); }
.three-slide-spark { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; border: 2px solid #c9ffd4; border-radius: 50%; box-shadow: 0 0 5px #8cf0b7; transform: translate(-50%, -50%) rotate(var(--tackle-screen-angle, 0rad)) translateX(clamp(8px, 1.5vw, 14px)) scale(var(--contact-scale, 1)); opacity: var(--contact-opacity, 0); z-index: 6; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .three-avatar-rig { transform: none; }
  .three-avatar-arm-left { transform: rotate(12deg); }
  .three-avatar-arm-right { transform: rotate(-12deg); }
  .three-avatar-leg-left { transform: none; }
  .three-avatar-leg-right { transform: translateX(var(--avatar-kick, 0px)); }
}
.three-celebration { position: absolute; inset: 0; z-index: 8; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; color: #ffe49a; text-align: center; background: radial-gradient(ellipse at center, #ffd46525, transparent 62%); animation: three-goal-reveal 2s ease-out both; }
.three-celebration[hidden] { display: none; }
.three-celebration strong { font-size: clamp(32px, 8vw, 76px); font-weight: 900; text-shadow: 0 3px 6px #0009, 0 0 22px #e9aa49aa; }
.three-scorer { max-width: 90%; margin: 6px 0; padding: 7px 13px; border-radius: 7px; background: #082333d9; color: #fff6df; font-size: clamp(11px, 2vw, 17px); overflow-wrap: anywhere; }
.three-screen[data-goal-team="away"] .three-celebration { color: #ffa690; background: radial-gradient(ellipse at center, #ff8b6528, transparent 62%); }
.three-confetti { position: absolute; inset: 12% 14%; overflow: hidden; }
.three-confetti i { position: absolute; top: 10%; left: 12%; width: 5px; height: 13px; background: #ffe39a; animation: three-confetti-fall 1.6s ease-out both; }
.three-confetti i:nth-child(2) { left: 27%; animation-delay: .1s; background: #75caed; }
.three-confetti i:nth-child(3) { left: 41%; animation-delay: .2s; }
.three-confetti i:nth-child(4) { left: 59%; animation-delay: .05s; background: #ef9d85; }
.three-confetti i:nth-child(5) { left: 73%; animation-delay: .18s; background: #8fe3b3; }
.three-confetti i:nth-child(6) { left: 88%; animation-delay: .12s; }
.three-celebrating .three-score { animation: three-score-pop .65s ease-out both; }
.three-celebrating[data-goal-team="home"] .three-goal-right,
.three-celebrating[data-goal-team="away"] .three-goal-left { animation: three-net-ripple .8s ease-out both; }
@keyframes three-goal-reveal { 0% { opacity: 0; transform: scale(.85); } 15%, 72% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.02); } }
@keyframes three-score-pop { 35% { transform: scale(1.08); color: #fff4b7; text-shadow: 0 0 14px #ffd467; } 100% { transform: scale(1); } }
@keyframes three-confetti-fall { 0% { opacity: 0; transform: translateY(-15px) rotate(0); } 15% { opacity: .9; } 100% { opacity: 0; transform: translateY(150px) rotate(220deg); } }
@keyframes three-net-ripple { 25% { background-position: 3px 2px; box-shadow: 0 4px 12px #ffe19a77; } 65% { background-position: -2px 0; } 100% { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .three-celebration { animation: none; } .three-celebrating .three-score, .three-celebrating .three-goal, .three-confetti i { animation: none; } .three-confetti { display: none; } }
.three-football { position: absolute; left: 50%; top: 50%; z-index: 4; width: clamp(11px, 1.8vw, 17px); aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; border: 1px solid #dce7e3; background: radial-gradient(circle at 50% 40%, #203640 0 26%, transparent 29%), radial-gradient(circle at 0 85%, #203640 0 22%, transparent 24%), #f6f5e8; box-shadow: 1px 3px 3px #041e2d99; pointer-events: none; }
.three-player .three-shirt {
  box-shadow: 0 var(--run-shadow-y, 5px) 5px #071a2466, inset 0 0 0 2px #fff2;
}
.three-carrier .three-shirt {
  box-shadow: 0 0 0 2px #fff3c2, 0 var(--run-shadow-y, 5px) 5px #071a2466;
}
.three-possession { color: #e6d29c; font-size: 12px; line-height: 1.7; margin: 0 0 14px; }
.three-carrier .three-shirt { box-shadow: 0 0 0 2px #fff3c2, 0 5px 5px #071a2466; }
.three-kickoff { position: absolute; inset: 0; z-index: 6; display: grid; place-content: center; gap: 12px; text-align: center; background: #081b3277; color: #ffe4a2; pointer-events: none; }
.three-kickoff[hidden] { display: none; }
.three-kickoff > span { padding: 8px 14px; border-radius: 6px; background: #0d213ce6; font-size: clamp(12px, 2vw, 17px); }
.three-kickoff > strong { font-size: clamp(36px, 7vw, 64px); text-shadow: 0 3px 10px #0009; }
.three-control-bar { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; margin-top: 24px; color: #bdced6; font-size: 12px; }
.three-control-bar > span { display: inline-flex; gap: 5px; align-items: center; }
.three-control-bar kbd { display: inline-block; padding: 5px 6px; border: 1px solid #657d8b; border-bottom-width: 3px; border-radius: 4px; background: #182f43; color: #ebd7a2; font: 10px monospace; }
.three-control-bar .three-controlled { color: #ffe0a1; margin-left: auto; }
.three-notice { color: #a7bdc8; font-size: 12px; line-height: 1.8; margin: 18px 0; }
.three-rosters { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding-top: 16px; border-top: 1px solid #9ab6c72b; }
.three-roster h3 { color: #dec88f; margin: 0 0 10px; font-size: 12px; }
.three-roster ul { list-style: none; padding: 0; margin: 0; color: #bdcdd6; font-size: 12px; line-height: 1.9; overflow-wrap: anywhere; }
@media (max-width: 540px) {
  .three-teams small { display: none; }
  .three-teams .three-phase { order: 3; }
  .three-control-bar .three-controlled { flex-basis: 100%; margin-left: 0; }
  .three-stadium { padding: 30px 16px; }
  .three-player-name { bottom: calc(100% + 5px); }
}

/* Active camera v2: a projected decorative plane plus upright actor overlays.
   .three-field retains its original layout dimensions for the simulation. */
.three-stadium .three-field { transform: none; background: transparent; border-color: transparent; box-shadow: none; }
.three-stadium .three-field::after { display: none; }
.three-ground { position: absolute; inset: 0; transform-origin: 0 0; border: 0; outline: 2px solid #e2f0de; background: repeating-linear-gradient(90deg, #28694c 0% 10%, #307554 10% 20%); box-shadow: 0 0 0 7px #204e3d, 0 0 0 8px #adc8ad66, 0 10px 20px #0007; pointer-events: none; z-index: 0; }
.three-ground::after { content: ""; position: absolute; top: 100%; left: -2px; right: -2px; height: 10px; background: linear-gradient(#2a6147, #123429); border-radius: 0 0 4px 4px; }
.three-ground .three-goal { display: none; }
.three-goal-visual { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.three-celebrating[data-goal-team="home"] .three-goal-net[data-goal-side="right"],
.three-celebrating[data-goal-team="away"] .three-goal-net[data-goal-side="left"] { animation: three-goal-net-flash .8s ease-out; }
@keyframes three-goal-net-flash { 30% { opacity: .55; } 65% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .three-goal-net { animation: none !important; } }
.three-field .three-player { transform: translate(-50%, -50%) scale(var(--actor-depth, 1)); }
.three-field .three-football { transform: translate(-50%, -50%) scale(var(--actor-depth, 1)); }
.three-field .three-kickoff { z-index: 2000; }
.three-field .three-celebration { z-index: 2100; }
.three-field .three-kickoff > span, .three-field .three-kickoff > strong,
.three-field .three-celebration > strong, .three-field .three-scorer { transform: none; }
/* A billboard rises above its foot anchor (the world/collision centre).
   Feet and ball stay on the projected ground; head is no longer "forward". */
.three-field .three-avatar { transform: none; }
/* Both kits share transparent animation/collision wrappers. The only ground
   fill is a faint, fully feathered oval, never a solid sprite backing. */
.three-field .three-player, .three-field .three-avatar, .three-field .three-avatar-rig { background: transparent; box-shadow: none; }
.three-field .three-avatar::before { left: 19%; top: 44%; width: 62%; height: 14%; transform: none; border-radius: 50%; background: radial-gradient(ellipse, #071b281c 0%, #071b280d 35%, transparent 70%); filter: none; }
.three-field .three-avatar-rig { inset: auto; left: 12%; bottom: 50%; width: 76%; height: 100%; transform-origin: 50% 100%; transform: translate(calc(var(--avatar-impact, 0px) + var(--slide-x, 0px)), calc(var(--avatar-breathe, 0px) + var(--run-bob, 0px) + var(--slide-y, 0px))) rotate(var(--shot-lean, 0deg)) scaleY(var(--slide-crouch, 1)); }
.three-field .three-player .three-avatar .three-shirt { left: 28%; top: 28%; width: 44%; height: 39%; border-radius: 25% 25% 12% 12%; border-color: #153346; background: linear-gradient(90deg, var(--kit-dark), var(--kit) 45%, var(--kit-dark)); }
.three-field .three-avatar-number { transform: none; font-size: clamp(7px, 1.1vw, 10px); }
.three-field .three-avatar-head { left: 32%; top: 3%; width: 36%; height: 29%; border: 1px solid #956746; border-top: 4px solid #372b29; border-bottom: 2px solid #efc49a; border-radius: 45%; background: #d9ac83; transform: translateX(var(--look-x, 0px)); }
.three-field .three-avatar-arm { top: 31%; bottom: auto; width: 17%; height: 35%; transform-origin: 50% 10%; background: linear-gradient(var(--kit) 0 44%, #ddaa83 46%); }
.three-field .three-avatar-arm-left { left: 14%; transform: rotate(calc(8deg + var(--avatar-arm, 0deg))); }
.three-field .three-avatar-arm-right { left: 69%; transform: rotate(calc(-8deg - var(--avatar-arm, 0deg))); }
.three-field .three-avatar-leg { top: 63%; bottom: auto; width: 19%; height: 37%; transform-origin: 50% 0; border-radius: 12% 12% 25% 25%; background: linear-gradient(var(--shorts) 0 35%, #eaf0e6 37% 76%, #17202b 78%); }
.three-field .three-avatar-leg-left { left: 29%; transform: translate(var(--stride-x, 0px), var(--stride-y, 0px)) rotate(var(--carry-left-angle, 0rad)); }
.three-field .three-avatar-leg-right { left: 52%; transform: translate(calc(-1 * var(--stride-x, 0px) + var(--foot-kick-x, 0px)), calc(-1 * var(--stride-y, 0px) + var(--foot-kick-y, 0px) - var(--shot-lift, 0px))) rotate(var(--carry-right-angle, 0rad)); }
.three-shot-trail { position: absolute; left: 50%; top: 50%; width: 15px; height: 6px; border-radius: 50%; border: 1px solid #ffdf9a; background: linear-gradient(90deg, transparent, #fff4c699); transform: translate(-50%, -50%) rotate(var(--shot-direction, 0rad)) translateX(10px); transform-origin: center; opacity: var(--shot-flash, 0); pointer-events: none; z-index: 5; }
.three-field .three-player-name { bottom: calc(150% + 8px); }
.three-field .three-selection-arrow { bottom: calc(150% + 29px); }
.three-field .three-player-role { top: calc(50% + 9px); }
.three-field .three-selected::before { inset: auto; left: 50%; top: 50%; width: 105%; height: 48%; transform: translate(-50%, -50%); }
.three-field .three-slide-spark { z-index: 6; }
/* Remove rectangular wrapper/shirt decorations for both kits. Keep border
   widths intact so this visual fix cannot alter layout or collision sizes.
   The selected-player ::before oval and selection arrow are untouched. */
.three-field .three-player, .three-field .three-avatar, .three-field .three-avatar-rig { border-color: transparent; outline: none; box-shadow: none; }
.three-field .three-player .three-avatar .three-shirt { border-color: transparent; outline: none; box-shadow: none; }
.three-field .three-player.three-tackling .three-avatar .three-shirt { filter: brightness(1.12); }
.three-field .three-player.three-pressured .three-avatar .three-shirt { filter: brightness(calc(1 + var(--body-pressure, 0) * 0.12)); }
@media (prefers-reduced-motion: reduce) {
  .three-field .three-avatar-rig { transform: scaleY(var(--slide-crouch, 1)); }
  .three-field .three-avatar-arm-left, .three-field .three-avatar-arm-right { transform: none; }
  .three-field .three-avatar-leg-left { transform: none; }
  .three-field .three-avatar-leg-right { transform: translate(var(--foot-kick-x, 0px), var(--foot-kick-y, 0px)); }
}
