/* PvP jackpot presentation and seven-tab public navigation. */
.footer .tabs { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.pvp-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
#panel-pvp { --pvp-safe-top: 0px; --pvp-safe-bottom: 0px; display: grid; gap: 10px; min-width: 0; margin-block: 10px; padding-top: max(0px, calc(var(--pvp-safe-top) - env(safe-area-inset-top, 0px))); padding-bottom: 0; }
#panel-pvp[hidden], #panel-pvp [hidden] { display: none !important; }
#panel-pvp p, #panel-pvp h2, #panel-pvp h3 { margin: 0; }
.pvp-header { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.pvp-header h2 { flex: 1; min-width: 0; font-size: 20px; }
.pvp-invite { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 68px; padding: 8px 12px; text-align: start; }
.pvp-invite > img { flex: 0 0 88px; width: 88px; height: 44px; object-fit: cover; border-radius: var(--radius-sm); }
.pvp-invite-copy { display: grid; flex: 1; gap: 5px; min-width: 0; }
.pvp-invite-copy strong { font-size: 15px; line-height: 1.2; }
.pvp-invite-copy > span { font-size: 11px; line-height: 1.4; }
.pvp-invite-arrow { font-size: 24px; }
[dir="rtl"] .pvp-invite-arrow { transform: scaleX(-1); }
#pvp-invite-status:empty { display: none; }
.pvp-balance { padding: 10px 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pvp-round-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; font-size: 11px; color: var(--text-secondary); }
.pvp-round-label { min-width: 0; overflow-wrap: anywhere; }
.pvp-timer { flex-shrink: 0; max-width: 52%; padding: 6px 8px; text-align: center; font-size: 10px; font-variant-numeric: tabular-nums; }
[data-phase="locking"] .pvp-timer { animation: pvp-timer-pulse 1s ease-in-out infinite; }
.pvp-wheel-wrap { position: relative; isolation: isolate; width: 262px; height: 262px; margin: 0 auto; }
.pvp-wheel { position: absolute; inset: 0; display: block; width: 262px; height: 262px; overflow: visible; direction: ltr; }
.pvp-rim { fill: none; stroke: var(--color-border-strong); stroke-width: 2; }
.pvp-empty-ring { fill: none; stroke: var(--color-surface-2); stroke-width: 38; }
.pvp-slice { stroke: var(--color-bg); stroke-width: 2; transition: opacity 500ms; }
.pvp-rim-light { fill: var(--text-accent); animation: pvp-light 1200ms ease-in-out infinite; }
.pvp-light-1 { animation-delay: -600ms; }
[data-phase="result"] .pvp-rim-light { animation-duration: 500ms; }
.pvp-wheel-glow { position: absolute; inset: -12px; z-index: -1; border-radius: var(--radius-round); background: var(--gradient-ambient); pointer-events: none; animation: pvp-rays 60s linear infinite; }
.pvp-pointer { position: absolute; top: -3px; left: 119px; width: 24px; height: 28px; color: var(--text-accent); font-size: 28px; line-height: 28px; text-align: center; pointer-events: none; }
.pvp-wheel-avatars { position: absolute; inset: 0; pointer-events: none; }
.pvp-wheel, .pvp-wheel-avatars { transform-origin: 131px 135px; }
[data-phase="spinning"] .pvp-wheel, [data-phase="spinning"] .pvp-wheel-avatars { will-change: transform; }
[data-phase="spinning"] .pvp-rim-light { animation-duration: 120ms; }
.pvp-spin-caption { order: 1; padding-block: 16px; text-align: center; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.pvp-history { display: grid; gap: 10px; min-width: 0; }
.pvp-wheel-avatar { position: absolute; display: flex; }
.pvp-avatar { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 32px; width: 32px; height: 32px; border-radius: var(--radius-round); overflow: hidden; background: var(--color-surface-2); }
.pvp-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pvp-avatar img[hidden] { display: none; }
.pvp-wheel-avatar .pvp-avatar { width: 100%; height: 100%; flex-basis: 100%; border: 2px solid var(--slice-color); outline: 2px solid var(--color-bg); font-size: 9px; }
.pvp-wheel-avatar.is-me .pvp-avatar { font-size: 11px; }
.pvp-wheel-center { position: absolute; left: 58px; top: 62px; width: 146px; height: 146px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; pointer-events: none; }
.pvp-center-label { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); }
.pvp-bank { max-width: 142px; font-size: 32px; line-height: 1.1; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pvp-center-meta { font-size: 12px; color: var(--text-secondary); }
.pvp-wheel-empty { max-width: 120px; font-size: 17px; font-weight: 700; line-height: 1.5; color: var(--text-accent); }
.pvp-wheel-wrap[data-waiting="true"]::after { content: ""; position: absolute; inset: 9px 5px 1px; border: 3px solid transparent; border-top-color: var(--text-accent); border-bottom-color: var(--text-accent); border-radius: 50%; opacity: .65; pointer-events: none; animation: pvp-rays 12s linear infinite; }
.pvp-wheel-wrap[data-waiting="true"] .pvp-wheel-glow { opacity: .8; }
.pvp-wheel-wrap[data-waiting="true"] .pvp-bank { font-size: 25px; }
.pvp-top-up { display: grid; gap: 12px; padding: 18px; border: 1px solid var(--text-accent); background: var(--gradient-ambient); text-align: center; }
.pvp-top-up p { font-size: 14px; line-height: 1.6; }
.pvp-top-up button { min-height: 48px; }
.pvp-history-toggle { min-height: 44px; width: 100%; }
.pvp-page-button { min-width: 96px; padding: 10px 16px; border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm); }
.pvp-page-button:disabled { opacity: .45; cursor: not-allowed; }
.pvp-page-button:focus-visible, .pvp-history-toggle:focus-visible, #pvp-top-up-action:focus-visible { outline: 2px solid var(--text-accent); outline-offset: 3px; }
.pvp-betting-content { display: grid; gap: 10px; min-width: 0; order: 2; }
.pvp-layout > .pvp-winner { order: 3; }
[data-phase="result"] .pvp-layout > .pvp-winner { order: 1; }
.pvp-chance-strip { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; font-size: 11px; }
.pvp-chance-strip > span:first-child { max-width: 70%; overflow-wrap: anywhere; }
.pvp-chance-strip strong { flex-shrink: 0; font-variant-numeric: tabular-nums; }
.pvp-progress { display: block; flex: 1; height: 6px; overflow: hidden; border-radius: var(--radius-pill); background: var(--color-surface-3); }
.pvp-progress > span { display: block; width: 100%; height: 100%; transform-origin: left center; background: var(--text-accent); transition: transform 400ms var(--ease-out); }
.pvp-controls { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 8px; align-items: end; margin: 0; }
.pvp-controls label { display: grid; gap: 5px; min-width: 0; }
.pvp-controls label > span { font-size: 10px; color: var(--text-muted); }
.pvp-controls input, .pvp-controls select { width: 100%; min-width: 0; height: 52px; padding-inline: 10px; }
#pvp-submit { height: 52px; padding: 0 16px; max-width: 140px; font-size: 13px; }
#pvp-submit:active:not(:disabled) { transform: scale(.97); transition: transform 100ms; }
#pvp-leave { grid-column: 1 / -1; min-height: 36px; }
#pvp-amount-help { grid-column: 1 / -1; grid-row: 2; }
.pvp-players-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 18px; }
.pvp-players-header h3 { font-size: 12px; }
.pvp-players-header > span { font-size: 11px; color: var(--text-muted); }
.pvp-participants { margin: 0; padding: 0; list-style: none; }
.pvp-participants li { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 52px; padding: 8px 10px; border-bottom: 1px solid var(--color-border); }
.pvp-participants li:last-child { border-bottom: 0; }
#pvp-participants { overflow: hidden; }
#pvp-participants li.is-me { background: var(--background-active); }
.pvp-person { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
#pvp-participants .pvp-person { flex: 1; }
.pvp-person > span:last-child { overflow-wrap: anywhere; }
#pvp-participants .pvp-person > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
#pvp-participants .pvp-avatar { width: 34px; height: 34px; flex-basis: 34px; border: 2px solid var(--slice-color); }
.pvp-you { padding: 3px 4px; font-size: 9px; }
.pvp-player-stake { max-width: 92px; overflow-wrap: anywhere; font-size: 11px; font-variant-numeric: tabular-nums; text-align: end; }
.pvp-player-chance { display: grid; flex: 0 0 64px; justify-items: end; gap: 5px; font-size: 11px; font-variant-numeric: tabular-nums; }
.pvp-player-chance .pvp-progress { width: 56px; height: 3px; }
.pvp-player-chance .pvp-progress > span { background: var(--slice-color); }
.pvp-winner { position: relative; margin-top: 40px; padding: 48px 16px 20px; text-align: center; }
.pvp-winner-portrait { position: absolute; top: -46px; left: calc(50% - 42px); width: 84px; height: 84px; }
.pvp-winner-portrait > .pvp-avatar { position: relative; width: 84px; height: 84px; font-size: 28px; border: 2px solid var(--text-accent); }
.pvp-winner-halo { position: absolute; inset: -30px; border-radius: var(--radius-round); background: var(--gradient-ambient); box-shadow: var(--glow-gold); animation: pvp-halo 1.6s ease-in-out infinite alternate; }
.pvp-crown { position: absolute; left: -5px; top: -22px; font-size: 38px; color: var(--text-accent); transform: rotate(-12deg); }
.pvp-overline { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); }
#panel-pvp .pvp-winner-headline { margin-block: 6px; font-size: 38px; line-height: 1.15; overflow-wrap: anywhere; }
#panel-pvp .pvp-winner-headline.is-me { font-size: 44px; }
#panel-pvp .pvp-winner-amount { margin-block: 10px; font-size: 34px; line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pvp-winner-chips { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.pvp-winner-chips .chip { padding: 8px 10px; font-size: 11px; }
.pvp-game-details { font-size: 12px; }
.pvp-game-details summary { cursor: pointer; color: var(--text-secondary); }
#panel-pvp .pvp-game-details p { margin-top: 8px; }
.pvp-table-scroll { overflow-x: auto; min-width: 0; }
.pvp-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.pvp-table th, .pvp-table td { padding: 10px; text-align: start; border-bottom: 1px solid var(--color-border); }
.pvp-table details { min-width: 180px; }
.pvp-pagination { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-block: 10px; }
.pvp-pagination button { min-height: 40px; }
.pvp-intent { overflow-wrap: anywhere; white-space: pre-wrap; }
#pvp-status:empty { display: none; }
#panel-pvp[data-motion-paused="true"] *, #panel-pvp[data-motion-paused="true"] *::before, #panel-pvp[data-motion-paused="true"] *::after { animation-play-state: paused !important; }
@keyframes pvp-rays { to { transform: rotate(360deg); } }
@keyframes pvp-light { 50% { opacity: .4; } }
@keyframes pvp-halo { from { transform: scale(.94); opacity: .65; } to { transform: scale(1.06); opacity: 1; } }
@keyframes pvp-timer-pulse { 50% { transform: scale(1.08); } }
@keyframes pvp-result-in { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.pvp-winner[data-entering="true"] { animation: pvp-result-in 450ms cubic-bezier(.2,.9,.3,1.2) both; }
@media (max-width: 374px) {
  .pvp-controls { grid-template-columns: 66px minmax(0, 1fr) auto; gap: 6px; }
  #pvp-submit { padding-inline: 12px; max-width: 120px; }
  .pvp-player-chance { flex-basis: 56px; }
  .pvp-participants li { gap: 6px; padding-inline: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  #panel-pvp *, #admin-panel-pvp * { animation: none !important; transition: none !important; }
  .pvp-winner[data-entering="true"] { animation: pvp-result-fade 200ms ease-out both !important; }
}
@keyframes pvp-result-fade { from { opacity: 0; } to { opacity: 1; } }
