/* DR2c (feedback #2): the judge's split-flap cards. One card = two halves; a change folds the top
   half down over 180 ms (easeInQuad). The back (not scored yet) is grey with a thin cross. */
.fc {
  --fw: 56px; --fh: 80px; --fs: 52px; --fbg: #fff; --fbd: #000;
  position: relative; display: inline-block; flex: none; width: var(--fw); height: var(--fh);
  perspective: 320px; color: #000; font: 700 var(--fs)/var(--fh) Consolas, "DejaVu Sans Mono", Menlo, monospace;
  border-radius: 4px; box-shadow: 0 2px 0 rgba(0,0,0,0.35);
}
.fc::after { content: ""; position: absolute; inset: 0; border: 2px solid var(--fbd); border-radius: 4px; pointer-events: none; z-index: 4; }
.fc::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; margin-top: -0.5px; background: rgba(0,0,0,0.45); z-index: 3; }
.fc-top, .fc-bot, .fc-flap > span { position: absolute; left: 0; right: 0; height: 50%; overflow: hidden; background: var(--fbg); }
.fc-top { top: 0; border-radius: 4px 4px 0 0; }
.fc-bot { bottom: 0; border-radius: 0 0 4px 4px; }
.fc b { position: absolute; left: 0; right: 0; height: var(--fh); text-align: center; font-weight: inherit; letter-spacing: -0.02em; }
.fc-top b, .fc-front b { top: 0; }
.fc-bot b, .fc-backside b { bottom: 0; }
.fc-flap { position: absolute; left: 0; right: 0; top: 0; height: 50%; z-index: 2; transform-origin: 50% 100%; transform-style: preserve-3d; animation: fc-fold 180ms cubic-bezier(.55,.085,.68,.53) forwards; }
.fc-flap > span { top: 0; height: 100%; backface-visibility: hidden; }
.fc-front { border-radius: 4px 4px 0 0; box-shadow: inset 0 -1px 0 rgba(0,0,0,0.3); }
.fc-backside { transform: rotateX(180deg); border-radius: 0 0 4px 4px; }
@keyframes fc-fold { from { transform: rotateX(0deg); } to { transform: rotateX(-180deg); } }
.fc .bk {
  background-color: #8c8c8c; background-size: 100% 200%;
  background-image: linear-gradient(to top right, transparent calc(50% - 0.8px), #5e5e5e calc(50% - 0.8px), #5e5e5e calc(50% + 0.8px), transparent calc(50% + 0.8px)),
                    linear-gradient(to bottom right, transparent calc(50% - 0.8px), #5e5e5e calc(50% - 0.8px), #5e5e5e calc(50% + 0.8px), transparent calc(50% + 0.8px));
}
.fc-top.bk, .fc-front.bk { background-position: top; }
.fc-bot.bk, .fc-backside.bk { background-position: bottom; }
.fc .bk b { visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .fc-flap { animation: none; display: none; } }

/* The spectator's scorecard, at the bottom of the spectator panel. */
.specp .jcards { flex: none; padding: 12px 20px 22px; border-top: 1px solid #1f241f; background: #0d100d; }
.specp .jc-head { color: #6a6f6a; font-size: 11px; letter-spacing: 0.08em; margin-bottom: 10px; }
.specp .jc-blocks { display: flex; gap: 40px; justify-content: center; }
.specp .jb-tag { font-size: 13px; letter-spacing: 0.06em; margin-bottom: 6px; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.specp .jb-a .jb-tag { color: #e8e84a; }
.specp .jb-b .jb-tag { color: #ff6b3d; }
.specp .fc.dec { --fs: 38px; }
.specp .fc.dec b { letter-spacing: -0.08em; text-indent: -0.08em; }
.specp .jb-cards { display: flex; gap: 6px; cursor: ns-resize; user-select: none; padding: 2px; border-radius: 6px; }
.specp .jb-cards:hover { outline: 1px dashed #3a403a; outline-offset: 3px; }
.specp .jcards.frozen .jb-cards { cursor: default; outline: none; }
.specp .jcards.frozen .jc-head::after { content: "  ·  FINAL"; color: #ffd24a; }
/* C7.1: a judge who gave no card: one 14 px line after the end, no empty cards. The panel
   shrinks, so the spectator chat (flex 1) gets the space. */
.specp .jc-none { display: none; color: #8a8f8a; font-size: 14px; line-height: 20px; text-align: center; }
.specp .jcards.empty .jc-head, .specp .jcards.empty .jc-blocks { display: none; }
.specp .jcards.empty { padding: 10px 20px; }
.specp .jcards.empty .jc-none { display: block; }

/* The players' strip over the chat log: JUDGE 9.5 : 7.0. Hidden until the first card.
   D4.3a: under the badge row (this file loads after chat.css, so the old top: 18px put it ON my
   badge). The log moves down 42 px while the strip shows, so no line hides under it. */
.chat .jstrip {
  position: absolute; left: 28px; top: calc(var(--hud-h, 14px) + 4px); z-index: 2; display: none; align-items: center; gap: 8px;
  font-size: 13px; letter-spacing: 0.12em; color: #8fb0ee; background: #0a0c0a; padding: 0 10px 0 0;
  box-shadow: 0 0 0 8px #0a0c0a;
}
.chat .jstrip.on { display: flex; }
.chat.judged .log { top: calc(var(--hud-h, 14px) + 42px); }
.chat .jstrip .fc { --fw: 50px; --fh: 30px; --fs: 20px; --fbg: #141814; --fbd: #2f6fe0; box-shadow: none; perspective: 160px; }
.chat .jstrip .fc::before { background: rgba(0,0,0,0.8); }
.chat .jstrip .js-me { color: var(--c-me); }
.chat .jstrip .js-foe { color: var(--c-foe); }
.chat .jstrip .js-c { color: #8a8a8a; letter-spacing: 0; }
.chat .endcard .e-judge { color: #8fb0ee; font-size: 13px; letter-spacing: 0.06em; margin-top: 10px; text-align: center; }
.chat .endcard .e-jwin { color: #ffd24a; font-size: 14px; font-weight: 700; letter-spacing: 0.12em; margin-top: 4px; text-align: center; }
.chat .endcard .e-jpick { color: #8a8f86; font-weight: 400; }
/* D4.6: the spectators' votes on the end card, above the judge. Yellow when they decided. */
.chat .endcard .e-votes { color: #d4d4d4; font-size: 14px; letter-spacing: 0.12em; margin-top: 10px; text-align: center; font-variant-numeric: tabular-nums; }
.chat .endcard .e-votes.e-vwin { color: #ffd24a; font-weight: 700; }
