/* NORMAL TABLE: sparse outer HUD. All tokens are scoped to decoration. */
.table-cyber-layer {
  --ponder-stack-accent:#00e7ff;
  --ponder-stack-soft:#43f1f6;
  position:absolute; inset:0; z-index:3; overflow:hidden;
  contain:layout paint; pointer-events:none !important; user-select:none;
  color:var(--ponder-stack-accent); opacity:0; visibility:hidden;
  transition:color 800ms ease, opacity 240ms ease;
}
.table-cyber-layer[data-stack-zone="mid"] {
  --ponder-stack-accent:#985cff; --ponder-stack-soft:#b36aff;
}
.table-cyber-layer[data-stack-zone="short"] {
  --ponder-stack-accent:#ff3f5f; --ponder-stack-soft:#ff566f;
}
body.app-view-table .table-cyber-layer[data-active="true"] { opacity:1; visibility:visible; }
/* Dedicated presentations overlay the existing TABLE; retain its decoration. */
.table-cyber-layer * { pointer-events:none !important; }
.table-cyber-layer svg { position:absolute; overflow:visible; stroke-width:.75; }
.table-cyber-layer .hud-dim { opacity:.26; }
.table-cyber-layer .hud-ticks { stroke-dasharray:.13 1.8; stroke-width:4; opacity:.44; }
.table-cyber-layer .hud-segments { stroke-dasharray:9 3 1 14 5 4; stroke-width:1.5; opacity:.55; }
.table-cyber-layer .hud-secondary { stroke:currentColor; stroke-width:3; opacity:.5; }
.table-cyber-layer .hud-hot { stroke:currentColor; stroke-width:3; opacity:.3; }
.table-cyber-layer .hud-accent { stroke-width:3; opacity:.68; }
.table-cyber-layer .table-hud-microtext {
  font-family:ui-monospace,Consolas,monospace; font-size:.43em;
  font-weight:400; letter-spacing:.2em; line-height:1.65; opacity:.35;
}
.table-cyber-layer .table-hud-microtext span { display:block; margin-top:1.2em; }
/* Static signal damage: sliced glyphs and displaced scan bands, no flash loop. */
.table-cyber-layer [data-hud-echo] {
  -webkit-mask-image:repeating-linear-gradient(0deg,#000 0 .34em,transparent .34em .41em,#000 .41em 1em);
  mask-image:repeating-linear-gradient(0deg,#000 0 .34em,transparent .34em .41em,#000 .41em 1em);
}
.table-cyber-layer [data-hud-echo]::after {
  content:attr(data-hud-echo); position:absolute; inset:0; white-space:pre-line;
  transform:translate(.24em,0); color:inherit; opacity:.75;
  -webkit-mask-image:repeating-linear-gradient(0deg,transparent 0 .52em,#000 .52em .78em,transparent .78em 1.65em);
  mask-image:repeating-linear-gradient(0deg,transparent 0 .52em,#000 .52em .78em,transparent .78em 1.65em);
}
.table-hud-top-left { position:absolute; left:0; top:0; width:27%; height:25%; overflow:hidden; }
.table-hud-orbit {
  width:140%; aspect-ratio:1; left:-61%; top:-171%; opacity:.75;
}
.table-hud-ring-motion {
  transform-box:view-box; transform-origin:50% 50%;
  animation:ponder-table-hud-orbit var(--hud-ring-period,90s) linear infinite paused;
}
.table-hud-ring-middle { --hud-ring-period:120s; }
.table-hud-ring-fine { --hud-ring-period:70s; }
.table-hud-ring-brackets { --hud-ring-period:150s; }
.table-hud-orbit .hud-major-ticks { stroke-width:7; stroke-dasharray:.48 11.1; stroke-dashoffset:.175; opacity:.7; }
.table-hud-orbit .hud-inner-ticks { stroke-width:3; stroke-dasharray:.07 .43; opacity:.65; }
.table-hud-orbit .hud-inner-brackets { stroke-width:5; opacity:.7; }
.table-hud-orbit .hud-secondary, .table-hud-orbit .hud-hot { stroke:inherit; }
body.app-view-table .table-cyber-layer[data-active="true"] :is(.table-hud-ring-motion,.table-hud-pixels,.table-hud-sparse-pixels path) { animation-play-state:running; }
body.ponder-duel-active .table-cyber-layer[data-active] :is(.table-hud-ring-motion,.table-hud-pixels,.table-hud-sparse-pixels path),
body.ponder-showdown-result-mode .table-cyber-layer[data-active] :is(.table-hud-ring-motion,.table-hud-pixels,.table-hud-sparse-pixels path),
body.ponder-tournament-winner-presentation .table-cyber-layer[data-active] :is(.table-hud-ring-motion,.table-hud-pixels,.table-hud-sparse-pixels path),
body.app-view-table .table-cyber-layer[data-document-hidden="true"] :is(.table-hud-ring-motion,.table-hud-pixels,.table-hud-sparse-pixels path) { animation-play-state:paused; }
@keyframes ponder-table-hud-orbit { to { transform:rotate(360deg); } }
.table-hud-left { position:absolute; left:1.5%; top:29%; width:5%; height:35%; }
.table-hud-left .table-hud-microtext { position:absolute; top:27%; left:4%; }
.table-hud-pixels {
  --hud-pixel-low:.12; --hud-pixel-high:.4;
  position:absolute; width:62%; height:26%; opacity:.25;
  background:repeating-linear-gradient(0deg,transparent 0 5px,#02040a 5px 9px),
    repeating-linear-gradient(90deg,currentColor 0 5px,transparent 5px 9px);
  -webkit-mask-image:linear-gradient(135deg,#000,transparent 66%);
  mask-image:linear-gradient(135deg,#000,transparent 66%);
  animation:ponder-table-hud-pixels 6.8s ease-in-out infinite paused;
}
.table-hud-top-right .table-hud-pixels { animation-duration:7.6s; animation-delay:-2.4s; }
.table-hud-right .table-hud-pixels { animation-duration:8.4s; animation-delay:-4.1s; }
@keyframes ponder-table-hud-pixels {
  0%,100% { opacity:var(--hud-pixel-low); }
  50% { opacity:var(--hud-pixel-high); }
}
.table-hud-left .table-hud-rail {
  position:absolute; bottom:0; left:4%; width:3px; height:20%; opacity:.4;
  background:repeating-linear-gradient(0deg,currentColor 0 4px,transparent 4px 10px);
}
.table-hud-top-right { position:absolute; right:1.5%; top:1%; width:31%; height:38%; }
.table-hud-circuit { inset:0; width:100%; height:100%; opacity:.5; }
.table-hud-system { position:absolute; left:39%; top:5%; text-align:center; }
.table-hud-system b { font-weight:400; }
.table-hud-principles { position:absolute; right:0; top:39%; }
.table-hud-top-right .table-hud-pixels { left:3%; top:1%; width:19%; height:20%; }
.table-hud-right { position:absolute; right:0; top:37%; width:9%; height:40%; }
.table-hud-right .table-hud-microtext { position:absolute; right:8%; top:0; opacity:.26; }
.table-hud-right .table-hud-pixels {
  right:4%; bottom:-5%; width:55%; height:11%; opacity:.25;
}
.table-hud-sparse-pixels { inset:0; width:100%; height:100%; }
.table-hud-sparse-pixels path {
  --hud-pixel-low:.12; --hud-pixel-high:.4;
  animation:ponder-table-hud-pixels 7.8s ease-in-out -1.8s infinite paused;
}
.table-hud-sparse-pixels path:nth-child(2) {
  --hud-pixel-low:.2; --hud-pixel-high:.6;
  animation-duration:9.2s; animation-delay:-5.6s;
}
.table-hud-bottom-left { left:1.2%; bottom:2%; width:8.3%; height:21%; opacity:.44; }
.table-cyber-layer .table-hud-bottom { position:absolute; right:1.8%; bottom:.4%; font-size:.32em; opacity:.27; }
/* Density follows the real letterboxed 16:9 stage (em scales with that stage),
   not a new root transform. Core poker elements are never resized here. */
@media (max-width:900px), (max-height:420px) {
  .table-hud-principles, .table-hud-bottom { display:none; }
  .table-hud-left .table-hud-microtext { opacity:.24; }
  .table-hud-left .table-hud-microtext span { display:none; }
  .table-hud-pixels { --hud-pixel-low:.08; --hud-pixel-high:.28; width:46%; height:18%; opacity:.18; }
  .table-hud-top-left { width:24%; }
  .table-hud-orbit { opacity:.52; }
  .table-hud-right .table-hud-microtext { display:none; }
  .table-hud-right .table-hud-pixels { width:55%; opacity:.2; }
  .table-hud-sparse-pixels { opacity:.65; }
  .table-hud-bottom-left { opacity:.26; }
}
@media (prefers-reduced-motion:reduce) {
  .table-cyber-layer { transition:none; }
  .table-cyber-layer :is(.table-hud-ring-motion,.table-hud-pixels,.table-hud-sparse-pixels path) { animation:none; }
}

/* Stronger orbit, same outer geometry and rotation owners. */
.table-hud-orbit .hud-dim { stroke-width:2.25; }
.table-hud-orbit .hud-ticks { stroke-width:12; }
.table-hud-orbit .hud-major-ticks { stroke-width:21; }
.table-hud-orbit .hud-segments { stroke-width:4.5; }
.table-hud-orbit :is(.hud-secondary,.hud-hot,.hud-accent) { stroke-width:9; }
.table-hud-orbit .hud-inner-ticks { stroke-width:9; }
.table-hud-orbit .hud-inner-brackets { stroke-width:15; }
.table-cyber-layer .table-hud-seat-circuit { position:absolute;width:16%;height:10%;opacity:.85;stroke-width:1.3; }
.table-cyber-layer .table-hud-seat3-circuit { left:27%;top:.5%;width:15%;height:6%;opacity:.32; }
.table-cyber-layer .table-hud-seat5-circuit { left:1.3%;top:68%;width:8.5%;height:10%; }
