/* Shared finite finish for voxel modes. Setup, pause and gameplay UI are untouched. */
.voxel-victory {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 24px;
  pointer-events: none;
  isolation: isolate;
  color: #faf6e9;
  text-align: center;
  background: radial-gradient(ellipse at 50% 46%, #94702e24, #09090bc4 76%);
}
.voxel-victory[hidden] { display: none !important; }
.voxel-victory[data-voxel-kind=shinobi] { background: radial-gradient(ellipse at 50% 46%, #aa493d30, #09090bdb 76%); }
.voxel-victory[data-voxel-kind=shinobi] .voxel-victory-board { border-color: #ef947a66; background: linear-gradient(145deg, #36221fd9, #111113f2 68%); }
[data-voxel-kind=shinobi] .voxel-crest-frame { fill: #e98767; }
[data-voxel-kind=shinobi] .voxel-crest-symbol { fill: #ffd4aa; }
.voxel-victory-board {
  position: relative;
  width: min(100%, 610px);
  max-height: 100%;
  min-height: 0;
  overflow: auto;
  padding: clamp(22px, 4vw, 42px) clamp(20px, 5vw, 58px) 26px;
  border: 1px solid #e4bd674a;
  border-radius: 20px;
  box-shadow: inset 0 1px #fff4c411, 0 24px 100px #0007;
  background: linear-gradient(145deg, #2a241bd9, #111113f2 68%);
  animation: voxel-victory-arrive 420ms cubic-bezier(.18,.72,.25,1) both;
}
.voxel-victory-board::before {
  content: '';
  position: absolute;
  inset: 0 24px auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, #ffe2a08c, transparent);
}
.voxel-victory-medal { display: grid; justify-items: center; gap: 10px; margin-bottom: 20px; }
.voxel-victory-medal .voxel-finish-crest { width: 82px; height: 82px; filter: drop-shadow(0 8px 24px #d79e3936); }
.voxel-finish-crest { display: block; flex: 0 0 auto; }
.voxel-crest-shadow { fill: #4c3516; }
.voxel-crest-frame { fill: #dca64d; }
.voxel-crest-inset { fill: #251e16; }
.voxel-crest-symbol { fill: #f4cf81; }
.voxel-crest-highlight { fill: #fff0bd; }
.voxel-victory-brand { display: block; width: 96px; height: 24px; object-fit: contain; image-rendering: pixelated; opacity: .75; }
.voxel-victory-kicker { position: relative; margin: 0; color: #f1ca79; font: 650 10px/1.5 var(--font, Arial, sans-serif); letter-spacing: .22em; }
.voxel-victory-title { position: relative; margin: 12px 0; font: 720 clamp(30px, 4.5vw, 52px)/1.08 var(--font, Arial, sans-serif); letter-spacing: -.055em; text-wrap: balance; }
.voxel-victory-copy { max-width: 440px; margin: 0 auto; color: #c4bdae; font: 400 13px/1.6 var(--font, Arial, sans-serif); text-wrap: pretty; }
.voxel-victory-rule { margin-top: 25px; padding-top: 15px; border-top: 1px solid #d3b46b29; }
.voxel-victory-mark { color: #9b9383; font: 550 9px/1.4 var(--font, Arial, sans-serif); letter-spacing: .18em; }
.voxel-victory-rays {
  position: absolute;
  z-index: -1;
  width: min(1100px, 150vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: repeating-conic-gradient(from 15deg, #e9bd642b 0 8deg, transparent 8deg 29deg);
  mask-image: radial-gradient(circle, #000 2%, transparent 65%);
  animation: voxel-victory-rays 1850ms ease-out both;
}
.voxel-victory-pixels { position: absolute; inset: 0; pointer-events: none; }
.voxel-victory-pixels i {
  position: absolute;
  top: 42%;
  left: 50%;
  width: 6px;
  height: 6px;
  background: #ecc979;
  --voxel-burst-x: -260px;
  --voxel-burst-y: -175px;
  animation: voxel-victory-pixel 1350ms ease-out both;
}
.voxel-victory-pixels i:nth-child(2) { --voxel-burst-x: -340px; --voxel-burst-y: 45px; animation-delay: 60ms; width: 4px; height: 4px; }
.voxel-victory-pixels i:nth-child(3) { --voxel-burst-x: -210px; --voxel-burst-y: 210px; animation-delay: 110ms; }
.voxel-victory-pixels i:nth-child(4) { --voxel-burst-x: 270px; --voxel-burst-y: -150px; animation-delay: 40ms; }
.voxel-victory-pixels i:nth-child(5) { --voxel-burst-x: 360px; --voxel-burst-y: 55px; animation-delay: 80ms; width: 4px; height: 4px; }
.voxel-victory-pixels i:nth-child(6) { --voxel-burst-x: 220px; --voxel-burst-y: 240px; animation-delay: 140ms; }
.voxel-victory-pixels i:nth-child(7) { --voxel-burst-x: -70px; --voxel-burst-y: -270px; animation-delay: 120ms; background: #fff0bd; }
.voxel-victory-pixels i:nth-child(8) { --voxel-burst-x: 80px; --voxel-burst-y: 280px; animation-delay: 170ms; background: #fff0bd; }
.voxel-victory-announcement { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.voxel-victory[data-milestone=true] { align-items: start; padding-top: 26px; background: transparent; }
.voxel-victory[data-milestone=true] .voxel-victory-board { display: grid; grid-template-columns: 46px minmax(0, 1fr); column-gap: 15px; row-gap: 4px; width: min(100%, 470px); padding: 16px 20px; border-radius: 12px; text-align: left; background: linear-gradient(120deg, #29231bf5, #111113f2); box-shadow: 0 10px 36px #0005; }
.voxel-victory[data-milestone=true] .voxel-victory-medal { grid-column: 1; grid-row: 1 / 4; align-self: center; margin: 0; }
.voxel-victory[data-milestone=true] .voxel-victory-medal .voxel-finish-crest { width: 46px; height: 46px; }
.voxel-victory[data-milestone=true] .voxel-victory-brand,
.voxel-victory[data-milestone=true] .voxel-victory-rule,
.voxel-victory[data-milestone=true] .voxel-victory-rays,
.voxel-victory[data-milestone=true] .voxel-victory-pixels { display: none; }
.voxel-victory[data-milestone=true] .voxel-victory-kicker { grid-column: 2; font-size: 9px; letter-spacing: .14em; }
.voxel-victory[data-milestone=true] .voxel-victory-title { grid-column: 2; margin: 0; font-size: 25px; letter-spacing: -.045em; }
.voxel-victory[data-milestone=true] .voxel-victory-copy { grid-column: 2; margin: 0; font-size: 11px; line-height: 1.5; }
@keyframes voxel-victory-arrive { from { opacity: 0; transform: translateY(20px) scale(.965); } to { opacity: 1; transform: none; } }
@keyframes voxel-victory-rays { from { opacity: 0; transform: rotate(-9deg) scale(.8); } 25% { opacity: .65; } to { opacity: .16; transform: rotate(7deg) scale(1.08); } }
@keyframes voxel-victory-pixel { from { opacity: 0; transform: translate(0, 0) scale(.5); } 18% { opacity: .9; } to { opacity: 0; transform: translate(var(--voxel-burst-x), var(--voxel-burst-y)) rotate(90deg); } }

body .voxel-finish-card[data-voxel-result] {
  width: min(100%, 800px);
  max-height: min(100%, calc(100dvh - 112px));
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: auto;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid #313135;
  border-radius: 18px;
  background: var(--card, #111113);
  box-shadow: 0 32px 110px #0009, inset 0 1px #ffffff07;
}
body .voxel-finish-card[data-voxel-result=won] { border-color: #c49a4c62; background: radial-gradient(ellipse at 0 0, #a1762121, transparent 56%), var(--card, #111113); }
.voxel-finish-card[data-voxel-result] :is(h1, h2, h3)[tabindex='-1']:focus { outline: none; }
.voxel-finish-card[data-voxel-result] > :is(.eyebrow, .practice-eyebrow),
.voxel-finish-card[data-voxel-result] .practice-result-heading > .practice-eyebrow,
.voxel-finish-card[data-voxel-result] .practice-result-heading > .practice-result-context { display: none; }
.voxel-finish-hero { display: flex; align-items: center; flex-shrink: 0; gap: 18px; margin-bottom: 24px; padding-bottom: 22px; border-bottom: 1px solid #ffffff12; }
.voxel-finish-medal { display: grid; place-items: center; width: 76px; height: 76px; flex: 0 0 auto; background: #e0b56b0b; border: 1px solid #f1d09624; border-radius: 14px; }
.voxel-finish-medal .voxel-finish-crest { width: 48px; height: 48px; }
.voxel-finish-award { display: grid; gap: 7px; min-width: 0; }
.voxel-finish-label { color: #e6c17a; font: 650 10px/1.4 var(--font, Arial, sans-serif); letter-spacing: .15em; }
.voxel-finish-rank { color: #f5d78f; font: 750 30px/1 var(--font, Arial, sans-serif); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.voxel-finish-context { color: var(--muted-foreground, #a1a1aa); font: 450 12px/1.5 var(--font, Arial, sans-serif); overflow-wrap: anywhere; }
body .voxel-finish-card[data-voxel-result=lost] .voxel-finish-medal { border-color: #52525b60; background: #27272a45; }
body .voxel-finish-card[data-voxel-result=lost] .voxel-finish-label { color: #d4d4d8; }
body .voxel-finish-card[data-voxel-result=lost] .voxel-finish-rank { color: #e4e4e7; }
body .voxel-finish-card[data-voxel-result=lost] .voxel-crest-shadow { fill: #29292e; }
body .voxel-finish-card[data-voxel-result=lost] .voxel-crest-frame { fill: #71717a; }
body .voxel-finish-card[data-voxel-result=lost] .voxel-crest-inset { fill: #242428; }
body .voxel-finish-card[data-voxel-result=lost] .voxel-crest-symbol { fill: #c4c4ce; }
body .voxel-finish-card[data-voxel-result=lost] .voxel-crest-highlight { fill: #ececf0; }
body .voxel-finish-card > h2,
body .voxel-finish-card .practice-result-heading h2 { font-size: clamp(30px, 4vw, 42px); line-height: 1.1; letter-spacing: -.05em; }
body .voxel-finish-card .practice-result-footer,
body .voxel-finish-card .voxel-result-footer,
body .voxel-finish-card .voxel-finish-actions,
body .voxel-finish-card .solo-actions { margin-top: auto; padding-top: 30px; }
body .voxel-finish-card > .practice-primary { margin-top: auto; }
body .voxel-finish-card > .practice-primary,
body .voxel-finish-card > .practice-secondary { min-height: 46px; }
body .voxel-finish-card[data-voxel-result=won] .practice-primary,
body .voxel-finish-card[data-voxel-result=won] .primary-button,
body .voxel-finish-card[data-voxel-result=won] .primary { background: #f0cc80; border-color: #f0cc80; color: #211909; }
body .voxel-finish-card[data-voxel-result=won] .practice-primary:hover:not(:disabled),
body .voxel-finish-card[data-voxel-result=won] .primary-button:hover:not(:disabled),
body .voxel-finish-card[data-voxel-result=won] .primary:hover:not(:disabled) { background: #ffe2a1; border-color: #ffe2a1; }
.voxel-finish-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 24px 0 0; padding: 24px 0; border-top: 1px solid #ffffff12; border-bottom: 1px solid #ffffff12; }
.voxel-finish-stats > div { min-width: 0; }
.voxel-finish-stats dt { color: var(--muted-foreground, #a1a1aa); font: 600 9px/1.5 var(--font, Arial, sans-serif); letter-spacing: .08em; }
.voxel-finish-stats dd { margin: 8px 0 0; color: var(--foreground, #fafafa); font: 720 clamp(22px, 3vw, 32px)/1 var(--font, Arial, sans-serif); letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.voxel-finish-scoreline { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 18px 0 0; color: #d4d4d8; font: 550 12px/1.6 var(--font, Arial, sans-serif); font-variant-numeric: tabular-nums; }
.voxel-finish-scoreline > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border: 1px solid #ffffff12; border-radius: 9px; background: #09090b40; }
.voxel-finish-scoreline > div > span { color: #a1a1aa; font-size: 10px; letter-spacing: .05em; }
.voxel-finish-scoreline > div > strong { font: 750 30px/1 var(--font, Arial, sans-serif); letter-spacing: -.04em; }
.voxel-finish-scoreline > .is-winner { border-color: #b9954d55; background: #e4bd6410; }
.voxel-finish-scoreline > .is-winner > strong { color: #f1d28c; }
.voxel-finish-scoreboard { margin-top: 24px; border: 1px solid #ffffff12; border-radius: 10px; overflow: hidden; background: #09090b45; }
.voxel-finish-scoreboard > summary { padding: 13px 16px; cursor: pointer; color: #d4d4d8; font: 550 12px/1.5 var(--font, Arial, sans-serif); }
.voxel-finish-scoreboard > summary::marker { color: #a1a1aa; }
.voxel-finish-scoreboard > summary:focus-visible { outline: 2px solid #f0cc80; outline-offset: -4px; border-radius: 8px; }
.voxel-finish-scoreboard[open] > summary { border-bottom: 1px solid #ffffff12; }
.voxel-finish-roster { list-style: none; margin: 0; padding: 8px 16px; max-height: 200px; overflow: auto; }
.voxel-finish-roster > li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 16px; padding: 10px 0; color: #d4d4d8; font: 450 12px/1.5 var(--font, Arial, sans-serif); font-variant-numeric: tabular-nums; border-bottom: 1px solid #ffffff08; }
.voxel-finish-card[data-voxel-kind=royale] .voxel-finish-roster > li { grid-template-columns: 26px minmax(0, 1fr) auto; }
.voxel-finish-roster > .is-self { margin: 0 -8px; padding-left: 8px; padding-right: 8px; background: #ffffff04; border-radius: 6px; }
.voxel-finish-roster > .is-winner > b { color: #f1d28c; }
.voxel-finish-roster > li:last-child { border-bottom: 0; }
.voxel-finish-roster > li > :first-child { min-width: 0; overflow-wrap: anywhere; }
.voxel-finish-roster > li > :last-child { flex-shrink: 0; color: #a1a1aa; }
.voxel-finish-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px; }
.voxel-finish-actions > button, .voxel-finish-actions > a { min-height: 44px; }
.voxel-finish-action-note { margin: 18px 0 0; color: var(--muted-foreground, #a1a1aa); font: 400 11px/1.6 var(--font, Arial, sans-serif); }
body .voxel-finish-card .horde-result-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 16px; margin: 22px 0 0; padding: 22px 0; }
body .voxel-finish-card .horde-result-stats dd { font-size: 27px; }
body .dojo-tools #dojo-finish { width: 100%; min-height: 38px; margin-top: 8px; color: var(--muted-foreground, #a1a1aa); border: 1px solid var(--border, #313135); border-radius: 8px; background: transparent; font-size: 11px; }
body .dojo-tools #dojo-finish:hover:not(:disabled) { color: var(--foreground, #fafafa); background: #ffffff07; }
@media (max-width: 600px) {
  .voxel-victory { padding: 18px; }
  .voxel-victory-board { border-radius: 16px; padding: 24px 20px 20px; }
  .voxel-victory-medal { gap: 8px; margin-bottom: 18px; }
  .voxel-victory-medal .voxel-finish-crest { width: 64px; height: 64px; }
  .voxel-victory-copy { font-size: 12px; }
  .voxel-victory[data-milestone=true] { padding-top: 18px; }
  .voxel-victory[data-milestone=true] .voxel-victory-board { grid-template-columns: 38px minmax(0, 1fr); padding: 14px 16px; column-gap: 12px; }
  .voxel-victory[data-milestone=true] .voxel-victory-medal .voxel-finish-crest { width: 38px; height: 38px; }
  .voxel-victory[data-milestone=true] .voxel-victory-title { font-size: 22px; }
  body .voxel-finish-card[data-voxel-result] { min-height: 0; max-height: min(100%, calc(100dvh - 80px)); padding: 22px; border-radius: 14px; }
  .voxel-finish-hero { gap: 14px; margin-bottom: 20px; padding-bottom: 18px; }
  .voxel-finish-medal { width: 60px; height: 60px; border-radius: 11px; }
  .voxel-finish-medal .voxel-finish-crest { width: 40px; height: 40px; }
  .voxel-finish-context { font-size: 11px; }
  .voxel-finish-rank { font-size: 25px; }
  body .voxel-finish-card .practice-result-footer,
  body .voxel-finish-card .voxel-result-footer,
  body .voxel-finish-card .voxel-finish-actions,
  body .voxel-finish-card .solo-actions { padding-top: 24px; }
  .voxel-finish-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; padding: 20px 0; margin-top: 20px; }
  .voxel-finish-stats dd { font-size: 26px; }
  .voxel-finish-actions { flex-direction: column; align-items: stretch; }
  .voxel-finish-actions > button, .voxel-finish-actions > a { width: 100%; }
  .voxel-finish-roster > li { gap: 12px; font-size: 11px; }
  .voxel-finish-scoreline > div { padding: 10px 12px; }
  .voxel-finish-scoreline > div > strong { font-size: 25px; }
  body .voxel-finish-card .horde-result-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; padding: 20px 0; }
  body .voxel-finish-card .horde-result-stats dd { font-size: 25px; }
}
@media (max-height: 560px) and (orientation: landscape) {
  .voxel-victory-board { width: min(100%, 660px); padding: 18px 30px; }
  .voxel-victory-medal { margin-bottom: 12px; }
  .voxel-victory-medal .voxel-finish-crest { width: 46px; height: 46px; }
  .voxel-victory-brand, .voxel-victory-rule { display: none; }
  .voxel-victory-title { margin: 8px 0; font-size: 30px; }
  body .voxel-finish-card[data-voxel-result] { min-height: 0; max-height: min(100%, calc(100dvh - 32px)); padding: 20px 26px; }
  .voxel-finish-hero { margin-bottom: 16px; padding-bottom: 14px; }
}
.voxel-victory[data-reduced-motion=true] .voxel-victory-rays,
.voxel-victory[data-reduced-motion=true] .voxel-victory-pixels { display: none; }
.voxel-victory[data-reduced-motion=true] .voxel-victory-board { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .voxel-victory-rays, .voxel-victory-pixels { display: none; }
  .voxel-victory-board { animation: none; }
}
