/* Blind stacks, one-touch chants and a clear center. Copy lives in help/history. */
body[data-screen="game"] .table-game.game-reloj .controller { display: none; }
body[data-screen="game"] .table-game.game-reloj .table-scene { grid-template-columns: minmax(0, 1fr); grid-template-rows: 0 minmax(0, 1fr); }
body[data-screen="game"] .table-game.game-reloj .game { grid-template-rows: minmax(0, 1fr); }
/* Preserve live announcements for assistive tech without adding tapete captions. */
body[data-screen="game"] .table-game.game-reloj :is(#turn-status, .table-announcement) {
  position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; overflow: hidden; clip-path: inset(50%);
}
.table-game .reloj-table {
  --reloj-card: clamp(70px, 22cqh, 112px);
  display: grid; grid-template-rows: minmax(0, 1fr) auto;
  width: min(100%, 640px); height: 100%; padding: 4px 8px 20px; gap: 16px;
  text-align: center; color: var(--pop-paper); align-self: stretch;
}
.reloj-arena { position: relative; display: grid; place-items: center; min-height: 0; }
.reloj-center { position: relative; }
.reloj-pile { display: grid; place-items: center; min-width: 44px; min-height: 44px; padding: 4px; border: 0; border-radius: 8px; background: transparent; box-shadow: none; color: var(--pop-paper); font: inherit; }
.reloj-face { display: block; width: var(--reloj-card); aspect-ratio: 110 / 156; border-radius: 7px; }
.reloj-face:has(.card-art) { box-shadow: 3px 4px 0 #172f26; }
.reloj-pile:disabled { opacity: 1; }
.reloj-pile:focus-visible, .reloj-rank:focus-visible, .reloj-slap:focus-visible { outline: 3px solid var(--pop-paper); outline-offset: 2px; }
.reloj-chant { position: absolute; left: calc(50% + var(--reloj-card) / 2 + 14px); top: calc(50% - 18px); line-height: 1.1; }
.reloj-chant > strong { font-size: clamp(26px, 5vw, 44px); font-weight: 400; color: #f3c66b; }
.reloj-own { display: grid; grid-template-columns: 100px minmax(0, 1fr); grid-template-rows: auto auto auto; gap: 8px 16px; align-items: center; width: min(100%, 430px); justify-self: center; }
.reloj-own-name { grid-column: 1; grid-row: 1; font-size: 16px; }
.reloj-own .physical-stack { grid-column: 1; grid-row: 2 / 4; --back-width: 62px; width: 90px; height: 98px; }
.reloj-ranks { grid-column: 2; grid-row: 1 / 3; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
.reloj-rank { min-width: 0; min-height: 44px; padding: 4px 1px; border: 1px solid var(--pop-ink); border-radius: 5px; background: var(--pop-paper); color: var(--pop-ink); font: inherit; font-size: 16px; box-shadow: 1px 2px 0 var(--pop-ink); }
.reloj-rank:disabled { opacity: .6; }
.reloj-slap { grid-column: 2; grid-row: 3; min-height: 44px; padding: 6px 12px; border: 2px solid var(--pop-ink); border-radius: 6px; box-shadow: 1px 2px 0 var(--pop-ink); background: var(--player-color); color: var(--pop-ink); font: inherit; font-size: 18px; }
.reloj-slap:disabled { opacity: .6; }
.game-reloj .opponent .avatar { background: var(--player-color); color: var(--pop-ink); }
.game-reloj .reloj-own-name::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 4px; border: 1px solid var(--pop-ink); border-radius: 50%; background: var(--player-color); }
.reaction-hands { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
.reaction-hand { --hand-width: clamp(72px, 9.5cqw, 94px); position: absolute; display: block; width: var(--hand-width); height: calc(var(--hand-width) * 830 / 384); left: 50%; top: 50%; margin-left: calc(var(--hand-width) * -.56); margin-top: calc(var(--hand-width) * -830 / 384 * .52); transform-origin: 56% 52%; filter: drop-shadow(2px 3px 1px #17251c90); }
.reaction-hand-art { display: block; width: 100%; height: 100%; }
.reaction-bracelet { position: absolute; left: 31%; top: 81%; width: 59%; height: 11%; background: var(--player-color); isolation: isolate; mask: url("../assets/reactions/bracelet.webp") 0 0 / 100% 100% no-repeat; }
.reaction-bracelet-art { display: block; width: 100%; height: 100%; mix-blend-mode: multiply; }
.reaction-hand[data-last="true"] { filter: drop-shadow(3px 5px 1px #17251cc0); }
.reaction-hand-initial { position: absolute; inset: 0; display: grid; place-items: center; padding-bottom: 1px; color: var(--pop-ink); font: calc(var(--hand-width) * .17) / 1 var(--serif); }
@media (max-width: 700px), (max-height: 500px) {
  body[data-screen="game"] .table-game.game-reloj .opponents[data-crowded="true"] .opponent:is([data-edge="left"], [data-edge="right"]) .opponent-detail { max-width: 54px; }
  .game-reloj .opponents[data-crowded="true"] .opponent:is([data-edge="left"], [data-edge="right"]) .opponent-detail::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 3px; border: 1px solid var(--pop-ink); border-radius: 50%; background: var(--player-color); }
}
@media (max-width: 600px) {
  .table-game .reloj-table { padding: 0 0 16px; gap: 12px; }
  .reloj-own { grid-template-columns: 70px minmax(0, 1fr); gap: 8px 6px; width: calc(100% - 44px); }
  .reloj-own .physical-stack { width: 68px; --back-width: 56px; }
  .reloj-ranks { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  .reloj-rank { font-size: 15px; }
  .reloj-rank:last-child { grid-column: 2; }
}
@media (max-height: 500px) {
  .table-game .reloj-table { --reloj-card: 60px; width: 100%; gap: 8px; padding: 0 0 8px; }
  .reloj-arena { padding-top: 20px; }
  .reloj-own { width: min(calc(100% - 44px), 700px); grid-template-columns: 60px minmax(0, 1fr) 112px; grid-template-rows: auto auto; gap: 4px 8px; }
  .reloj-ranks { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .reloj-rank { font-size: 14px; }
  .reloj-rank:last-child { grid-column: auto; }
  .reloj-slap { grid-column: 3; grid-row: 1 / 3; min-height: 60px; padding: 6px; }
  .reloj-own-name { font-size: 12px; }
  .reloj-own .physical-stack { grid-row: 2; --back-width: 36px; height: 56px; width: 54px; }
  .reloj-chant > strong { font-size: 28px; }
  .reaction-hand { --hand-width: 60px; }
}
@media (max-width: 360px) {
  .reloj-rank[data-rank="knight"] { font-size: 13px; }
}
@media (max-height: 350px) {
  .reaction-hand { --hand-width: 48px; }
}
