/* King: what only King has (public/games/king.js) */

/* the contract on its medallion: a suit, or the mark of a penalty */
.kg-medal .medal-rank.r { color: #ff9a8e; }
.kg-medal .medal-rank.long { font-size: calc(var(--cw) * 0.26); letter-spacing: -0.02em; }
.kg-medal .medal-rank { position: relative; }
.kg-medal .medal-rank b { font: inherit; }
/* the contract's name may wrap rather than reach over the trick */
.kg-medal .medal-cap { white-space: normal; text-align: center; max-width: calc(var(--cw) * 1.25); line-height: 1.15; }
/* the trick number, on the medallion's rim */
.kg-no {
  position: absolute; top: calc(var(--cw) * -0.05); right: calc(var(--cw) * -0.12);
  padding: 0 calc(var(--cw) * 0.05); border-radius: 99px; font-family: var(--display); font-weight: 800; font-size: calc(var(--cw) * 0.12); line-height: 1.5;
  color: #1c1404; background: var(--gold); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45); font-variant-numeric: lining-nums;
}
.kg-no:empty { display: none; }
.float.kg-new { color: var(--gold); font-family: var(--display); font-style: italic; font-size: calc(19px * var(--ui)); }
.kg-s { font-style: normal; }
.kg-s.r { color: var(--suit-red); }
.float .kg-s.r, .banner .kg-s.r, .results .kg-s.r { color: #ff9a8e; }

/* the contract picker over your name plate, while you choose */
.kg-pick {
  position: absolute; left: 50%; top: 0; z-index: 450; width: max-content; max-width: calc((100vw - 16px) / var(--ui));
  transform: translate(-50%, -100%) scale(var(--ui)); transform-origin: 50% 100%;
  padding: 8px 10px 10px; border-radius: 14px; background: rgba(6, 16, 11, 0.95); box-shadow: inset 0 0 0 1px var(--line-strong), 0 14px 34px rgba(0, 0, 0, 0.55);
  opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.25s var(--ease);
}
.kg-pick.on { opacity: 1; pointer-events: auto; }
#table.picking .banner { opacity: 0; transition: opacity 0.15s; }
.kp-head { display: flex; align-items: baseline; justify-content: center; flex-wrap: wrap; gap: 4px 10px; font-family: var(--display); font-style: italic; font-weight: 700; font-size: 16px; color: var(--gold); margin-bottom: 7px; }
.kp-head span { font-family: var(--body); font-style: normal; font-weight: 600; font-size: 12px; color: var(--ink-faint); }
.kp-grid { display: grid; grid-template-columns: repeat(3, 118px); gap: 5px; justify-content: center; }
.kp-c, .kp-s {
  position: relative; display: grid; align-content: center; justify-items: center; border-radius: 9px; color: var(--ink);
  background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px var(--line); transition: background 0.15s, transform 0.15s, opacity 0.15s;
}
.kp-c { height: 58px; padding: 0 6px; }
.kp-c b { font-family: var(--display); font-weight: 800; font-size: 14px; line-height: 1.1; text-align: center; }
.kp-c small { font-size: 11px; font-weight: 700; color: #ffb3a8; line-height: 1.2; }
.kp-c i { font-size: 10.5px; color: var(--ink-faint); line-height: 1.2; }
.kp-c .key, .kp-s .key { position: absolute; right: 3px; bottom: 3px; margin: 0; min-width: 15px; height: 15px; padding: 0 3px; font-size: 10px; border-radius: 4px; }
.kp-trump { display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 6px; }
.kp-trump > span { display: grid; justify-items: end; margin-right: 4px; line-height: 1.15; }
.kp-trump > span b { font-family: var(--display); font-weight: 800; font-size: 14px; }
.kp-trump > span small { font-size: 11px; font-weight: 700; color: #8fe3b4; }
.kp-s { width: 52px; height: 44px; font-size: 24px; line-height: 1; }
.kp-s.r { color: #ff8f84; }
.kp-c:hover:not(:disabled), .kp-s:hover:not(:disabled) { background: rgba(232, 194, 108, 0.14); transform: translateY(-2px); }
.kp-c:disabled, .kp-s:disabled { opacity: 0.3; cursor: default; }
@media (max-width: 420px) { .kp-grid { grid-template-columns: repeat(3, 104px); gap: 4px; } .kp-c { height: 56px; } .kp-c b { font-size: 13px; } .kp-s { width: 46px; } }

/* name plate badges: the chooser's contract, tricks taken, the deal's points */
.plate .bd .kg-by { font-family: var(--display); font-weight: 900; font-size: 12px; line-height: 1.3; color: #1c1404; background: var(--gold); padding: 0 6px; border-radius: 99px; }
.plate .bd .kg-tr { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; color: var(--ink-dim); }
.plate .bd .kg-tr::before { content: ''; width: 12px; height: 9px; border-radius: 2px; background: linear-gradient(135deg, #b2263a, #6d1020); box-shadow: 0 0 0 1px #f2e6c8, 1.5px 1.5px 0 0 rgba(242, 230, 200, 0.5); }
.plate .bd .kg-pt { font-family: var(--display); font-weight: 800; }
.plate .bd .kg-pt.neg { color: #ff9a8e; }
.plate .bd .kg-pt.pos { color: #8fe3b4; }
.lg .kg-pts { margin-left: 4px; font-family: var(--display); }

/* the contracts so far, under the scores */
.kg-chart-h { margin: 22px 0 0; font-family: var(--display); font-style: italic; color: var(--gold); font-size: 18px; }
.kg-chart td { font-size: 14px; }
.kg-chart th:last-child { text-transform: none; letter-spacing: 0; }
.kg-chart .kg-open { font-style: normal; color: var(--ink-faint); letter-spacing: 0.1em; }
.kg-chart .kg-foot td { color: var(--ink-faint); font-size: 13px; border-bottom: 0; }
.kg-chart .kg-foot td:first-child { font-family: var(--body); font-size: 13px; font-weight: 600; color: var(--ink-faint); }
