﻿/* One opaque result screen: an illustrated scene and a calm score sheet. */
.match-result{--victory:#afc966;--muted:#657264;position:absolute;inset:0;z-index:40;overflow-y:auto;padding:clamp(20px,4vw,44px);background:#10271e;color:#17382a;isolation:isolate}
.match-result[data-variant="tournament"]{--victory:#f6b845}
.result-layout{position:relative;width:min(1120px,100%);margin:auto;min-height:0;display:grid;grid-template-columns:1.08fr 1fr;overflow:hidden;border:2px solid #304638;border-radius:20px;background:#fff1d8}
.result-stage{min-width:0;display:flex;flex-direction:column;background:#cb794a;border-right:2px solid #304638}
.result-stage-heading{flex-shrink:0;padding:22px 28px;background:#19372b;color:#fff1d8}
.result-stage-heading>span{display:block;font-size:11px;font-weight:900;text-transform:uppercase;letter-spacing:2px;color:#c4d7a5;margin-bottom:4px}
.result-winner{margin:0;font-family:var(--font-display);font-size:clamp(22px,2.5vw,30px);font-weight:400;line-height:1.2;color:#fff1d8;text-shadow:none;overflow-wrap:anywhere}
.result-podium{display:block;width:100%;height:auto;min-height:0;flex:1;aspect-ratio:6/5;object-fit:contain;object-position:top}
.result-content{min-width:0;padding:24px 32px;background:#fff1d8}
.result-eyebrow{font-size:11px;font-weight:900;letter-spacing:2px;color:#53684b;margin:0 0 8px}
.result-content h1{font-family:var(--font-display);font-size:clamp(32px,3.7vw,48px);line-height:1.12;letter-spacing:-1px;margin:0;text-shadow:none;color:#17382a;text-wrap:balance}
.match-result .result-score{font:900 clamp(36px,4.3vw,58px)/1.1 var(--font-ui);margin:12px 0 0;color:#17382a;font-variant-numeric:tabular-nums;letter-spacing:-1px}
.result-details{margin-top:20px}
.result-stat-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:14px}
.result-stat-head h2{font-size:16px;font-weight:900;margin:0;color:#17382a}
.match-result :is(h1,h2,p,th,td,span){text-shadow:none;-webkit-text-stroke:0}
.result-stat-head span{font-size:12px;color:#657264;white-space:nowrap;font-variant-numeric:tabular-nums}
.result-stat-table{width:100%;border-collapse:collapse;font-size:14px;color:#17382a}
.result-stat-table th,.result-stat-table td{padding:9px 0;border-bottom:1px solid #d3d6bd;text-align:right;font-variant-numeric:tabular-nums}
.result-stat-table th:first-child{text-align:left;font-weight:600}
.result-stat-table thead th{font-size:11px;color:#657264;padding-top:0;font-weight:800}
.result-stat-table td{font-weight:900;width:21%}
.result-extra{margin-top:10px}
.result-extra summary{width:fit-content;min-height:36px;display:list-item;align-content:center;cursor:pointer;font-size:13px;font-weight:900;color:#425b37}
.result-extra summary:focus-visible{outline:3px solid #254f36;outline-offset:4px;border-radius:4px}
.result-extra[open] summary{margin-bottom:12px}
.result-extra .result-stat-table th:first-child{width:58%}
.result-highlight{display:flex;flex-wrap:wrap;gap:4px 16px;margin-top:12px;font-size:12px;line-height:1.5;color:#657264}
.result-series{font-size:12px;font-weight:800;line-height:1.5;color:#425b37;margin:22px 0 0;padding-top:16px;border-top:2px solid #d3d6bd}
.result-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:14px;margin-top:18px}
#match-result .result-actions .primary{width:100%;height:64px;min-height:64px;min-width:0;padding:14px 22px 20px;font-size:18px}
#match-result .result-actions .text-button{height:56px;min-height:56px;padding:12px 16px 18px;min-width:112px;font-size:14px;white-space:nowrap}
.result-actions p{grid-column:1/-1;font-size:12px;color:#657264;margin:0;line-height:1.5}
.result-actions p:empty{display:none}
.result-content :focus-visible{outline-color:#254f36;outline-offset:4px}
.result-confetti{position:absolute;inset:0;pointer-events:none;overflow:hidden}
.result-confetti i{position:absolute;left:var(--x);top:-20px;width:8px;height:15px;background:var(--victory);opacity:0;animation:confetti-fall 2.7s var(--delay) ease-in both}
.result-confetti i:nth-child(3n){background:#fff0bb;width:6px;height:8px}
.result-confetti i:nth-child(3n+1){background:#e09536}
.result-confetti i:nth-child(n+33){display:none}
[data-variant="tournament"] .result-confetti i{display:block;animation-duration:4.6s}
.series-score{position:absolute;top:135px;left:32px;z-index:3;font-size:11px;font-weight:800;letter-spacing:.6px;background:var(--glass-solid);border:1px solid var(--edge);border-radius:6px;padding:8px 12px;color:var(--lime-hi);pointer-events:none}
#shared-lobby .primary{width:100%;margin:16px 0 8px}
#lobby-status{font-size:13px;line-height:1.5}
#app #shared-lobby .primary{height:76px;min-height:76px;padding:18px 26px;font-size:19px}
#app:has(#match-result:not([hidden])) .topbar{visibility:hidden}
@keyframes confetti-fall{0%{opacity:0;transform:translateY(-20px) rotate(0)}8%{opacity:1}90%{opacity:.9}100%{opacity:0;transform:translate(var(--drift),85vh) rotate(var(--spin))}}
@media(min-width:761px) and (min-height:541px){.match-result{display:flex;align-items:center}}
@media(max-width:760px) and (min-height:541px){
  .match-result{padding:18px}.result-layout{width:min(540px,100%);grid-template-columns:1fr;border-radius:16px}
  .result-stage{border-right:0;border-bottom:2px solid #304638;display:grid;grid-template-columns:minmax(110px,.7fr) 1.3fr;align-items:stretch;background:#19372b}
  .result-stage-heading{padding:18px 16px;align-self:center}.result-winner{font-size:20px}.result-stage-heading>span{font-size:10px}
  .result-content{padding:24px}.result-content h1{font-size:34px}.match-result .result-score{font-size:44px;margin-top:8px}
  .result-details{margin-top:22px}.result-series{margin-top:18px}.series-score{top:126px;left:15px;font-size:9px}
}
@media(max-height:540px) and (orientation:landscape){
  .match-result{padding:14px 20px}.result-layout{grid-template-columns:.85fr 1.15fr;border-radius:14px}
  .result-stage-heading{padding:14px 18px}.result-winner{font-size:22px}.result-stage-heading>span{font-size:9px}
  .result-content{padding:20px 24px}.result-content h1{font-size:30px}.result-eyebrow{font-size:10px;margin-bottom:4px}
  .match-result .result-score{font-size:38px;margin-top:6px}.result-details{margin-top:16px}.result-stat-head{margin-bottom:8px}
  .result-stat-table{font-size:12px}.result-stat-table th,.result-stat-table td{padding:7px 0}.result-highlight{font-size:11px;margin-top:8px}
  .result-series{font-size:11px;margin-top:12px;padding-top:10px}.result-actions{margin-top:12px;gap:10px}
  #match-result .result-actions .primary{height:54px;min-height:54px;padding:10px 16px 16px;font-size:16px}
  #match-result .result-actions .text-button{height:48px;min-height:48px;padding:10px 12px 14px;min-width:100px;font-size:13px}
  .result-actions p{font-size:11px}.series-score{top:102px;left:16px;font-size:9px}
}
@media(prefers-reduced-motion:reduce){.result-confetti{display:none}}
.victory-confetti{position:fixed;inset:0;z-index:45;overflow:hidden;pointer-events:none;contain:strict}
.victory-confetti i{position:absolute;left:var(--x);top:-24px;width:9px;height:17px;background:var(--color);opacity:0;animation:victory-confetti-fall var(--fall) var(--delay) cubic-bezier(.2,.55,.7,1) both;will-change:transform,opacity}
.victory-confetti i:nth-child(3n){width:7px;height:10px;border-radius:2px}
.victory-confetti i:nth-child(4n){width:13px;height:6px}
@keyframes victory-confetti-fall{0%{opacity:0;transform:translate3d(0,-30px,0) rotate(0)}8%{opacity:1}85%{opacity:1}100%{opacity:0;transform:translate3d(var(--drift),110vh,0) rotate(var(--spin))}}
@media(prefers-reduced-motion:reduce){.victory-confetti{display:none}}
