/* Pinochle: everything the shared card table (games/card-kit/table.css) does not already draw: the trump badge, the
   bid box and the trump picker on the felt, the meld board, the hand sheet, the score pad and the coach strip. */
.pn { position: relative; }
#pn-sound .off { display: none; }
#pn-sound.pn-muted .on { display: none; }
#pn-sound.pn-muted .off { display: inline; }
.pn-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.pn .cg-sc > span:first-child { min-width: 0; flex: 1 1 auto; }
.pn .cg-sc small { display: block; }
.pn .cg-sc small b { margin: 0; font-size: inherit; color: #ffd166; }
.pn .cg-sc.them { border-color: rgba(255,107,129,0.4); }
.pn-red { color: #ff6b81; }
.pn-blk { color: #f4f7fb; }

/* ---- on the felt: trump and the bid at the top left, the meld and the last trick at the top right ---- */
.pn-badge { position: absolute; left: 8px; top: 8px; z-index: 6; display: flex; align-items: center; gap: 8px; padding: 5px 11px 5px 6px; border-radius: 12px; background: rgba(5,10,24,0.62); border: 1px solid rgba(255,255,255,0.1); color: #cfe0ff; font-size: 12px; line-height: 1.25; pointer-events: none; text-align: left; }
.pn-badge[hidden] { display: none; }
.pn-suit { width: 32px; height: 32px; flex: none; border-radius: 8px; background: #f4f2ea; display: grid; place-items: center; font-size: 22px; line-height: 1; color: #181a20; box-shadow: 0 0 0 1px rgba(0,0,0,0.35), 0 0 14px rgba(255,209,102,0.35); }
.pn-suit.red { color: #cf1d31; }
.pn-suit.none { background: rgba(255,255,255,0.08); color: #8aa3c4; box-shadow: none; font-size: 16px; font-weight: 800; }
.pn-badge b { display: block; color: #ffd166; font-size: 13.5px; white-space: nowrap; }
.pn-badge span { white-space: nowrap; }
.pn-fbtns { position: absolute; right: 8px; top: 8px; z-index: 6; display: flex; gap: 6px; }
.pn-fbtn { min-height: 40px; padding: 0 11px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.16); background: rgba(5,10,24,0.62); color: #cfe0ff; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; touch-action: manipulation; white-space: nowrap; }
.pn-fbtn[hidden] { display: none; }
.pn-fbtn:focus-visible { outline: 2px solid #55d6ff; outline-offset: 2px; }
@media (hover: hover) { .pn-fbtn:hover { border-color: #55d6ff; color: #fff; } }
.pn-fbtn .pn-n { display: none; }
.ct-narrow .pn-fbtn { padding: 0 9px; }
.ct-narrow .pn-fbtn .pn-w { display: none; }
.ct-narrow .pn-fbtn .pn-n { display: inline; }
.ct-narrow .pn-badge { left: 5px; top: 5px; gap: 6px; padding: 4px 8px 4px 4px; font-size: 11.5px; }
.ct-narrow .pn-badge b { font-size: 12.5px; }
.ct-narrow .pn-suit { width: 28px; height: 28px; font-size: 19px; }
.ct-narrow .pn-fbtns { right: 5px; top: 5px; gap: 4px; }
.ct-short .pn-badge { top: 4px; left: 4px; }
.ct-short .pn-fbtns { top: 4px; right: 4px; }
.ct-short .pn-fbtn { min-height: 34px; }

/* ---- the bid box and the trump picker (inside the table's centre panel) ---- */
.pn-box { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.pn-box h4 { margin: 0; font-size: 14.5px; font-weight: 800; color: #fff; text-align: center; }
.pn-suits { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.pn-sv { display: flex; align-items: center; justify-content: center; gap: 5px; min-width: 0; padding: 5px 2px; border-radius: 9px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); font-size: 13px; color: #cfe0ff; font-variant-numeric: tabular-nums; }
.pn-sv i { font-style: normal; font-size: 17px; line-height: 1; }
.pn-sv b { color: #fff; }
.pn-sv.best { border-color: rgba(255,209,102,0.7); background: rgba(255,209,102,0.1); }
.pn-note { margin: 0; font-size: 12.5px; line-height: 1.4; color: #cfe0ff; text-align: center; }
.pn-note b { color: #ffd166; }
.pn-bidrow { display: flex; gap: 6px; align-items: stretch; }
.pn-bidrow .ck-btn { min-height: 46px; }
.pn-step { flex: 0 0 46px; padding: 0; font-size: 15px; }
.pn-go { flex: 1 1 auto; font-size: 16px; }
.pn-go b { font-size: 18px; font-variant-numeric: tabular-nums; }
.pn-passbtn { flex: 0 0 auto; min-width: 82px; }
.pn-go.hint, .pn-passbtn.hint, .pn-tb.hint { border-color: #55d6ff; animation: ck-pulse 1.1s ease-in-out infinite; }
.pn-trump { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.pn-tb { min-height: 78px; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px 2px; border-radius: 12px; border: 1px solid #2a3d63; background: #0b1328; color: #dfe9ff; font: inherit; cursor: pointer; touch-action: manipulation; transition: border-color .15s, transform .1s; }
.pn-tb i { font-style: normal; font-size: 27px; line-height: 1; }
.pn-tb b { font-size: 13.5px; }
.pn-tb small { font-size: 11px; color: #8aa3c4; white-space: nowrap; }
.pn-tb.best { border-color: #ffd166; box-shadow: 0 0 0 1px #ffd166; }
.pn-tb:active { transform: scale(0.96); }
.pn-tb:focus-visible { outline: 2px solid #55d6ff; outline-offset: 2px; }
@media (hover: hover) { .pn-tb:hover { border-color: #55d6ff; } }
.ct-narrow .pn-box { gap: 6px; }
.ct-narrow .pn-bidrow .ck-btn { min-height: 44px; }
.ct-narrow .pn-tb { min-height: 66px; }
.ct-narrow .pn-tb i { font-size: 23px; }
.ct-short .pn-box { gap: 4px; }
.ct-short .pn-box h4 { font-size: 13px; }
.ct-short .pn-bidrow .ck-btn { min-height: 40px; }
.ct-short .pn-tb { min-height: 52px; flex-direction: row; gap: 6px; }
.ct-short .pn-tb small { display: none; }
.ct-short .pn-note { font-size: 11.5px; }
.ct-short .pn-sv { padding: 2px; }

/* ---- small cards (the meld board, the last trick, the pass) ---- */
.pn-cards { display: inline-flex; flex-wrap: wrap; gap: 2px; --cw: 30px; --ch: 42px; --fs: 11.5px; flex: none; vertical-align: middle; }
.pn-cards.big { --cw: 44px; --ch: 62px; --fs: 14px; gap: 4px; }
.pn-mc { position: relative; width: var(--cw); height: var(--ch); flex: none; }
.pn-mc.win .ck-card { box-shadow: 0 0 0 2.5px #ffd166, 0 2px 8px rgba(0,0,0,0.4); }

/* ---- sheets ---- */
.ck-sheet.pn-wide { max-width: 640px; }
.pn-team { margin: 12px 0 0; }
.pn-team > h4 { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 6px; font-size: 13px; font-weight: 800; color: #8aa3c4; text-transform: uppercase; letter-spacing: .05em; }
.pn-team > h4 b { color: #ffd166; font-size: 17px; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.pn-team.us > h4 { color: #6fe0b0; }
.pn-meld { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pn-mp { background: #0b1328; border: 1px solid #1c2b4a; border-radius: 12px; padding: 8px 10px 6px; min-width: 0; }
.pn-team.us .pn-mp { border-color: rgba(111,224,176,0.35); }
.pn-mp h5 { display: flex; justify-content: space-between; gap: 8px; margin: 0 0 4px; font-size: 13.5px; color: #fff; }
.pn-mp h5 b { color: #ffd166; font-variant-numeric: tabular-nums; }
.pn-mi { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-top: 1px solid #16213a; font-size: 12.5px; color: #cfe0ff; line-height: 1.25; }
.pn-mi .nm { min-width: 0; }
.pn-mi .v { margin-left: auto; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.pn-none { margin: 0; padding: 5px 0; border-top: 1px solid #16213a; color: #6f88aa; font-size: 12.5px; }
.pn-need { margin: 12px 0 0 !important; padding: 9px 12px; border-radius: 12px; background: rgba(255,209,102,0.1); border: 1px solid rgba(255,209,102,0.4); color: #dfe9ff !important; font-size: 14px !important; text-align: center; }
.pn-need b { color: #ffd166; }
.pn-trick { display: flex; justify-content: center; gap: 12px; margin: 14px 0 4px; flex-wrap: wrap; }
.pn-trick figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 12.5px; color: #8aa3c4; }
.pn-trick figure.win figcaption { color: #ffd166; font-weight: 800; }
.pn-pad { max-height: 46vh; overflow: auto; margin: 4px -4px 0; padding: 0 4px; }
.pn-pad .cg-res td, .pn-pad .cg-res th { padding: 6px 5px; font-size: 13px; }
.pn-pad .cg-res td:first-child { color: #b9c9e4; white-space: nowrap; }
.pn-pad .cg-res td small { display: block; color: #6f88aa; font-size: 11px; font-weight: 400; }
.pn-bar { display: block; height: 6px; border-radius: 3px; background: rgba(255,255,255,0.08); overflow: hidden; margin-top: 4px; }
.pn-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #55d6ff, #ffd166); }
.pn-opt { display: flex; flex-direction: column; }
.pn-opt .ck-row:first-child { border-top: 0; }
.pn-rulelist { margin: 0 0 10px; padding: 0; list-style: none; }
.pn-rulelist li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-top: 1px solid #16213a; font-size: 13.5px; color: #cfe0ff; }
.pn-rulelist li b { color: #ffd166; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pn-bigscore { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 10px 0 2px; font-variant-numeric: tabular-nums; }
.pn-bigscore div { text-align: center; }
.pn-bigscore b { display: block; font-size: 30px; color: #fff; line-height: 1.1; }
.pn-bigscore span { font-size: 12px; color: #8aa3c4; }
.pn-bigscore i { font-style: normal; color: #6f88aa; font-size: 18px; }
.pn-bigscore .won b { color: #ffd166; }
@media (max-width: 560px) {
  .pn-meld { grid-template-columns: 1fr; }
  .ck-sheet.pn-wide { padding: 18px 14px 14px; }
  .pn-cards { --cw: 28px; --ch: 39px; --fs: 11px; }
}

/* ---- the coach strip of the guided first hand ---- */
.pn-coach { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; padding: 7px 7px 7px 12px; border-radius: 12px; background: linear-gradient(90deg, rgba(85,214,255,0.14), rgba(255,209,102,0.1)); border: 1px solid rgba(85,214,255,0.42); color: #dfe9ff; font-size: 13.5px; line-height: 1.4; }
.pn-coach[hidden] { display: none; }
.pn-coach p { margin: 0; flex: 1 1 auto; min-width: 0; }
.pn-coach b { color: #ffd166; }
.pn-coach button { flex: none; min-height: 40px; min-width: 40px; padding: 0 10px; border-radius: 9px; border: 1px solid rgba(255,255,255,0.18); background: rgba(5,10,24,0.5); color: #cfe0ff; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.pn-coach button:focus-visible { outline: 2px solid #55d6ff; outline-offset: 2px; }
.ct-short .pn-coach { margin-bottom: 4px; padding: 3px 4px 3px 10px; font-size: 12px; }
.ct-short .pn-coach button { min-height: 32px; }
@media (max-width: 560px) { .pn-coach { font-size: 12.5px; padding: 6px 6px 6px 10px; gap: 6px; } }
@media (prefers-reduced-motion: reduce) { .pn-go.hint, .pn-passbtn.hint, .pn-tb.hint { animation: none; box-shadow: 0 0 0 2px #55d6ff; } }

/* ---- small finishing rules ---- */
.pn-mi.long { flex-wrap: wrap; }
.pn-mi.long .pn-cards { flex: 1 0 100%; }
.pn-badge strong { color: #ffd166; }
.pn-mp h5 i { margin-right: auto; font-style: normal; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #04060f; background: #ffd166; border-radius: 999px; padding: 1px 7px; align-self: center; }
.cg-res s { color: #ff6b81; text-decoration: none; font-weight: 800; }
.pn .ct-hand { margin-top: 18px; }
.pn.ct-short .ct-hand { margin-top: 2px; }
.pn-low .ct-center { top: auto; bottom: 6px; transform: translateX(-50%); padding: 9px 10px; }
.pn-low .pn-box { gap: 6px; }
.pn-badge .pn-n { display: none; }
.pn.ct-narrow .pn-badge .pn-w { display: none; }
.pn.ct-narrow .pn-badge .pn-n { display: inline; }
.pn.ct-narrow .pn-badge:not([hidden]) { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 1px 5px; padding: 4px 7px; max-width: 46%; }
.pn.ct-narrow .pn-badge > span:last-child { display: contents; }
.pn.ct-narrow .pn-badge > span:last-child > span { grid-column: 1 / -1; }
.pn.ct-narrow .pn-badge .pn-suit { width: 22px; height: 22px; font-size: 16px; border-radius: 6px; }
.pn.ct-narrow .pn-badge .pn-suit.none { display: none; }
.pn .cg-top select { min-height: 40px; }
.pn.ct-short:not(.ct-narrow) .pn-badge { padding: 3px 10px 3px 3px; gap: 7px; }
.pn.ct-short:not(.ct-narrow) .pn-badge > span:last-child { display: flex; align-items: baseline; gap: 7px; }
.pn.ct-short:not(.ct-narrow) .pn-badge b { display: inline; }
.pn.ct-short:not(.ct-narrow) .pn-badge .pn-suit { width: 24px; height: 24px; font-size: 17px; border-radius: 6px; }
/* a phone-width felt: the badge keeps the top left, the partner sits top right, the felt buttons drop to the bottom corner */
.pn.ct-narrow .ct-at-top { left: auto; right: 5px; top: 5px; transform: none; max-width: 64%; }
.pn.ct-narrow .ct-bubble.at-top { left: auto; right: 56px; margin-left: 0; }
.pn.ct-narrow .ct-at-left, .pn.ct-narrow .ct-at-right { top: max(56px, 26%); transform: none; }
.pn.ct-narrow .pn-fbtns { top: auto; bottom: 5px; right: 5px; }
/* the tall meld sheet keeps its button in reach */
.ck-sheet.pn-wide .ck-actions { position: sticky; bottom: 0; z-index: 2; margin: 12px -6px 0; padding: 10px 6px 4px; background: linear-gradient(to top, #0d1630 78%, rgba(13,22,48,0)); }
/* cards your partner passed: the mark sits on the strip of the card that stays in view in a long fan */
.pn .ct-hc.got .ck-card::before { right: auto; left: 5px; bottom: 7px; }
