/* Go Fish. Every class is prefixed gf-; buttons, sheets and cards come from the shared card kit (ck-). */
.gf { position: relative; max-width: 980px; margin: 0 auto; font-family: inherit; }
.gf-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- top bar ---- */
.gf-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 8px; }
.gf-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex: 1 1 300px; min-width: 0; }
.gf-sel { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.gf-sel label { display: inline-flex; }
.gf-sel label[hidden] { display: none; }
.gf select { min-height: 44px; max-width: 100%; background: #0b1328; color: #dfe9ff; border: 1px solid #1c2b4a; border-radius: 9px; padding: 0 10px; font: inherit; font-weight: 700; font-size: 13.5px; cursor: pointer; }
.gf-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.gf-tools .ck-btn { min-height: 44px; }
.gf-tools .ck-btn-icon { width: 44px; }
.gf :focus-visible { outline: 3px solid #ffd166; outline-offset: 2px; }
.gf-side:empty { display: none; }

/* ---- the table ---- */
.gf-stage { position: relative; display: flex; flex-direction: column; gap: 4px; height: clamp(340px, 72vh, 760px); padding: 8px 8px 10px; border-radius: 14px; border: 1px solid var(--ck-edge); background: var(--ck-felt); overflow: hidden; outline: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; --cw: 60px; --ch: 84px; --fs: 16px; }
.gf-stage:focus-visible { outline: 3px solid #ffd166; outline-offset: -3px; }
.gf-stage.gf-ptr:focus-visible { outline: none; }
@media (max-width: 600px) { .gf-stage { height: clamp(480px, 76vh, 700px); padding: 6px 6px 8px; } }
.gf-stage .ck-card { touch-action: manipulation; }

/* opponents */
.gf-pods { flex: none; display: flex; justify-content: center; gap: 8px; min-height: 0; }
.gf-pod { position: relative; flex: 1 1 0; min-width: 0; max-width: 300px; min-height: 64px; display: grid; grid-template-columns: auto minmax(0, 1fr); align-content: start; gap: 2px 8px; padding: 7px 9px; text-align: left; font: inherit; color: #dfe9ff; background: rgba(5, 11, 26, 0.6); border: 2px solid rgba(255, 255, 255, 0.13); border-radius: 14px; cursor: default; transition: border-color 0.2s, box-shadow 0.2s, opacity 0.2s; }
.gf-av { display: block; width: 42px; height: 42px; grid-row: span 2; flex: none; }
.gf-av svg { display: block; width: 100%; height: 100%; }
.gf-pname { align-self: end; font-weight: 800; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gf-pmeta { display: flex; align-items: center; gap: 6px; min-width: 0; min-height: 22px; font-size: 12.5px; color: #b9cbe6; white-space: nowrap; }
.gf-fan { position: relative; display: inline-block; height: 21px; flex: 0 1 auto; min-width: 15px; overflow: hidden; border-radius: 2.5px; }
.gf-pcount { flex: none; }
.gf-fan i { position: absolute; top: 0; width: 15px; height: 21px; border-radius: 2.5px; background: var(--ck-back); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35); }
.gf-pbooks { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-height: 26px; font-size: 12px; color: #9fb4d3; }
.gf-bk { display: inline-grid; place-items: center; min-width: 22px; height: 26px; padding: 0 3px; border-radius: 5px; background: #fdfaf2; color: #1a2440; font-weight: 800; font-size: 12.5px; line-height: 1; box-shadow: 2px 1px 0 #cfc7b3, 3px 2px 0 rgba(0, 0, 0, 0.3); }
.gf-bk.gf-bk-new { animation: gf-pop 0.5s ease; }
.gf-aid { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 3px 8px; font-size: 12px; line-height: 1.35; color: #b9cbe6; }
.gf-aid b { font-weight: 800; }
.gf-aid .gf-has { color: #9af0a8; }
.gf-aid .gf-no { color: #ffb3bd; }
.gf-key { position: absolute; right: 6px; top: 5px; min-width: 18px; padding: 1px 4px; border-radius: 5px; border: 1px solid rgba(255, 255, 255, 0.25); font-size: 11px; font-weight: 700; color: #b9cbe6; text-align: center; }
@media (hover: none) and (pointer: coarse) { .gf-key { display: none; } }
.gf-pod.gf-turn { border-color: #ffd166; box-shadow: 0 0 0 3px rgba(255, 209, 102, 0.25); }
.gf-pod.gf-out { opacity: 0.6; }
.gf-pod.gf-can { cursor: pointer; border-color: #55d6ff; animation: gf-pulse 1.1s ease-in-out infinite; }
.gf-pod.gf-tgt { border-color: #ffd166; box-shadow: 0 0 0 4px rgba(255, 209, 102, 0.5); }
.gf-pod.gf-hint-yes::after, .gf-pod.gf-hint-no::after { position: absolute; right: 6px; bottom: 5px; padding: 2px 7px; border-radius: 9px; font-size: 11.5px; font-weight: 800; }
.gf-pod.gf-hint-yes::after { content: 'asked for these'; background: #1f7a3a; color: #eafff0; }
.gf-pod.gf-hint-no::after { content: 'said no'; background: #7a2a36; color: #ffe9ec; }
.gf-narrow .gf-pod { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; padding: 6px 4px; gap: 1px; }
.gf-narrow .gf-av { grid-row: auto; width: 36px; height: 36px; }
.gf-narrow .gf-pbooks, .gf-narrow .gf-aid { justify-content: center; }
.gf-narrow .gf-pname { max-width: 100%; }

/* the pond */
.gf-mid { position: relative; flex: 1 1 auto; min-height: 0; }
.gf-pond { position: absolute; cursor: default; }
.gf-pond.gf-fishable { cursor: pointer; }
.gf-water { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(ellipse at 38% 30%, #58cfe0, #2aa3c4 45%, #137a9f 80%, #0d6589); box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.12), 0 0 0 9px rgba(214, 186, 128, 0.2), inset 0 6px 22px rgba(255, 255, 255, 0.25), inset 0 -14px 26px rgba(4, 30, 60, 0.45); overflow: hidden; }
.gf-water i { position: absolute; left: 50%; top: 50%; width: 46%; height: 46%; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.2); transform: translate(-50%, -50%) scale(0.4); opacity: 0; animation: gf-ripple 6s linear infinite; }
.gf-water i:nth-child(2) { animation-delay: 2s; }
.gf-water i:nth-child(3) { animation-delay: 4s; }
.gf-lily { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.gf-swim { position: absolute; left: 12%; top: 70%; width: 30px; height: 15px; opacity: 0.55; pointer-events: none; animation: gf-swim 26s linear infinite; }
.gf-pondcards { position: absolute; inset: 0; --cw: 40px; --ch: 56px; }
.gf-pc { transition: transform 0.35s ease, opacity 0.25s ease; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35); }
.gf-pc.gf-gone { opacity: 0; pointer-events: none; visibility: hidden; }
.gf-fishable .gf-pc { box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35), 0 0 0 2px rgba(255, 209, 102, 0.55); }
.gf-pc.gf-pf { box-shadow: 0 0 0 4px #ffd166, 0 6px 14px rgba(0, 0, 0, 0.5); z-index: 5; }
.gf-pondchip { position: absolute; left: 50%; bottom: -4px; transform: translateX(-50%); padding: 3px 11px; border-radius: 12px; background: rgba(5, 11, 26, 0.82); border: 1px solid rgba(255, 255, 255, 0.18); font-size: 12.5px; font-weight: 700; color: #dfe9ff; white-space: nowrap; pointer-events: none; z-index: 6; }
.gf-clock { position: absolute; right: 4px; top: 2px; z-index: 16; padding: 3px 10px; border-radius: 12px; background: #7a2a36; color: #fff; font-weight: 800; font-size: 13px; }
.gf-askbar { position: absolute; left: 0; right: 0; bottom: 4px; z-index: 16; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; pointer-events: none; }
.gf-askbar[hidden] { display: none; }
.gf-mid:has(> .gf-askbar:not([hidden])) .gf-pondchip { opacity: 0; }
.gf-askbar .ck-btn { pointer-events: auto; min-height: 50px; padding: 0 18px; font-size: 16px; border-radius: 14px; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45); }
.gf-askbar .ck-btn kbd { margin-left: 8px; padding: 1px 6px; border-radius: 5px; border: 1px solid rgba(0, 0, 0, 0.3); font: inherit; font-size: 12px; opacity: 0.75; }
@media (hover: none) and (pointer: coarse) { .gf-askbar .ck-btn kbd { display: none; } }

/* my side */
.gf-prompt { flex: none; min-height: 26px; padding: 2px 8px; text-align: center; font-weight: 800; font-size: 15.5px; line-height: 1.3; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); }
.gf-prompt.gf-go { color: #ffd166; }
.gf-me { flex: none; display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 4px; }
.gf-me .gf-av { width: 32px; height: 32px; }
.gf-me .gf-pname { align-self: center; flex: none; max-width: 38%; }
.gf-me .gf-pbooks { flex: 1 1 auto; min-height: 0; }
.gf-me .gf-count { flex: none; font-size: 12.5px; color: #b9cbe6; white-space: nowrap; }
.gf-me.gf-turn .gf-pname { color: #ffd166; }
.gf-hand { position: relative; flex: none; height: 96px; }
.gf-hc { cursor: pointer; transition: transform 0.24s ease, box-shadow 0.15s ease; }
.gf-hand.gf-lock .gf-hc { cursor: default; }
.gf-hc.gf-on { box-shadow: 0 0 0 3px #ffd166, 0 8px 16px rgba(0, 0, 0, 0.5); }
.gf-hc.gf-new { animation: gf-glow 1.6s ease; }
.gf-empty { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13.5px; color: #c6d6ee; text-align: center; }

/* things that fly, pop and talk */
.gf-fx { position: absolute; inset: 0; z-index: 20; pointer-events: none; }
.gf-fly { box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45); will-change: transform; }
.gf-bubble { position: absolute; max-width: min(78%, 330px); padding: 9px 14px; border-radius: 18px; background: #fffdf6; color: #14203a; font-weight: 800; font-size: 16px; line-height: 1.25; text-align: center; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4); animation: gf-pop 0.26s ease; z-index: 3; }
.gf-bubble::after { content: ''; position: absolute; left: var(--tail, 50%); width: 14px; height: 14px; margin-left: -7px; background: inherit; transform: rotate(45deg); }
.gf-bubble.gf-up::after { top: -6px; }
.gf-bubble.gf-down::after { bottom: -6px; }
.gf-bubble.gf-gofish { background: #ffd166; color: #2a1c00; font-size: 19px; }
.gf-bubble.gf-yes { background: #c9f7d2; color: #0f3a1c; }
.gf-banner { position: absolute; left: 50%; transform: translateX(-50%); width: max-content; max-width: 94%; padding: 6px 16px; border-radius: 16px; background: rgba(5, 11, 26, 0.85); border: 2px solid #ffd166; color: #ffd166; font-weight: 900; font-size: 19px; text-align: center; animation: gf-pop 0.3s ease; z-index: 4; }
.gf-spark { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; background: #ffd166; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); z-index: 5; }

/* pass-and-play curtain */
.gf-curtain { position: absolute; inset: 0; z-index: 40; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px; text-align: center; background: linear-gradient(180deg, #10224a, #0a1226 70%); overflow: auto; }
.gf-curtain[hidden] { display: none; }
.gf-curtain .gf-av { width: 72px; height: 72px; grid-row: auto; }
.gf-curtain h3 { margin: 0; font-size: 24px; color: #fff; }
.gf-curtain p { margin: 0; max-width: 420px; color: #b9cbe6; font-size: 14.5px; line-height: 1.45; }
.gf-curtain ul { margin: 0; padding: 0; list-style: none; max-width: 440px; font-size: 13.5px; line-height: 1.5; color: #dfe9ff; }
.gf-curtain .ck-btn { min-height: 54px; padding: 0 24px; font-size: 17px; border-radius: 14px; }
.gf-toast { z-index: 45; max-width: 92%; }
.gf-toast.gf-long.show { animation-duration: 6s; }   /* seat news at an online table stays long enough to read */

/* sheets */
.gf-sheet { max-width: 520px; }
.gf-sheet h3 { margin-right: 36px; }
.gf-sheet p, .gf-sheet li { line-height: 1.5; }
.gf-sheet ul, .gf-sheet ol { margin: 6px 0 10px; padding-left: 20px; font-size: 14px; color: #c9d8ef; }
.gf-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 8px 0; border-top: 1px solid rgba(255, 255, 255, 0.07); }
.gf-row > span { flex: 1 1 150px; font-weight: 700; font-size: 14px; }
.gf-row small { display: block; margin-top: 2px; font-weight: 400; font-size: 12.5px; line-height: 1.4; color: #8aa3c4; }
.gf-row .ck-seg { flex: none; max-width: 100%; flex-wrap: wrap; }
.gf-row .ck-seg button { min-height: 40px; }
.gf-row input { min-height: 40px; width: 150px; max-width: 100%; background: #0b1328; color: #dfe9ff; border: 1px solid #1c2b4a; border-radius: 9px; padding: 0 10px; font: inherit; font-size: 14px; }
.gf-res { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin: 6px 0; border-radius: 12px; background: rgba(255, 255, 255, 0.05); border: 1px solid transparent; }
.gf-res.gf-win { border-color: #ffd166; background: rgba(255, 209, 102, 0.1); }
.gf-res .gf-av { width: 38px; height: 38px; grid-row: auto; }
.gf-res .gf-rname { flex: none; min-width: 64px; font-weight: 800; font-size: 14.5px; }
.gf-res .gf-pbooks { flex: 1 1 auto; min-height: 0; flex-wrap: wrap; height: auto; overflow: visible; }
.gf-newbadge b { margin-right: 4px; }
.gf-res .gf-rnum { flex: none; font-weight: 900; font-size: 20px; color: #fff; }
.gf-res.gf-win .gf-rnum { color: #ffd166; }
.gf-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 6px; margin: 8px 0; }
.gf-stats div { padding: 7px 8px; border-radius: 10px; background: rgba(255, 255, 255, 0.05); font-size: 12px; color: #8aa3c4; text-align: center; }
.gf-stats b { display: block; font-size: 18px; color: #fff; }
.gf-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; margin: 8px 0 4px; }
.gf-badge { padding: 7px 9px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.1); font-size: 12px; line-height: 1.35; color: #8aa3c4; }
.gf-badge b { display: block; font-size: 13px; color: #c9d8ef; }
.gf-badge.gf-got { border-color: #ffd166; background: rgba(255, 209, 102, 0.1); }
.gf-badge.gf-got b { color: #ffd166; }
.gf-newbadge { margin: 8px 0; padding: 8px 12px; border-radius: 12px; background: rgba(255, 209, 102, 0.14); border: 1px solid #ffd166; color: #ffe7ad; font-size: 13.5px; }
.gf-note { margin: 8px 0 0; font-size: 12.5px; color: #8aa3c4; }

/* help line under the table */
.gf-help kbd { display: inline-block; min-width: 18px; padding: 0 5px; border: 1px solid #1c2b4a; border-radius: 5px; background: #0b1328; font: inherit; font-size: 11.5px; }
.gf-help .hint-touch { display: none; }
@media (hover: none) and (pointer: coarse) { .gf-help .hint-kb { display: none; } .gf-help .hint-touch { display: inline; } }

/* ---- short tables (phone on its side) ---- */
.gf-compact .gf-pod { min-height: 46px; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; padding: 4px 8px; }
.gf-compact .gf-av { width: 32px; height: 32px; grid-row: auto; }
.gf-compact .gf-pname { align-self: center; }
.gf-compact .gf-fan { display: none; }
.gf-compact .gf-pbooks { grid-column: 1 / -1; min-height: 0; }
.gf-compact .gf-pbooks:empty { display: none; }
.gf-compact .gf-bk { height: 20px; min-width: 18px; font-size: 11px; }
.gf-compact .gf-prompt { min-height: 22px; font-size: 14px; }
.gf-compact .gf-me { min-height: 26px; }
.gf-compact .gf-me .gf-av { width: 24px; height: 24px; }
.gf-compact .gf-askbar .ck-btn { min-height: 44px; font-size: 14.5px; }
.gf-compact .gf-curtain { gap: 6px; padding: 8px; }
.gf-compact .gf-curtain .gf-av { width: 44px; height: 44px; }
.gf-compact .gf-curtain h3 { font-size: 19px; }
.gf-compact .gf-curtain ul { display: none; }

/* ---- full screen ---- */
.gf.gf-fit { max-width: none; height: 100%; margin: 0; padding: 6px 8px 8px; display: flex; flex-direction: column; overflow: hidden; box-sizing: border-box; }
.gf-fit .gf-top { flex: none; margin-bottom: 6px; }
.gf-fit .gf-side { flex: none; }
.gf-fit .gf-stage { flex: 1 1 auto; height: auto; min-height: 0; }
.gf-fit .gf-help { display: none; }
.gf.gf-short { display: grid; grid-template-columns: 190px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 6px 8px; }
.gf-short .gf-top { grid-column: 1; grid-row: 1 / span 2; flex-direction: column; flex-wrap: nowrap; align-items: stretch; justify-content: flex-start; margin: 0; overflow: auto; }
.gf-short .gf-opts { flex: none; flex-direction: column; align-items: stretch; }
.gf-short .gf-sel { flex-direction: column; }
.gf-short .gf-sel select { width: 100%; }
.gf-short .gf select, .gf-short .gf-tools .ck-btn { min-height: 40px; }
.gf-short .gf-tools { display: grid; grid-template-columns: 1fr 1fr; }
.gf-short .gf-tools .ck-btn { width: auto; padding: 0 6px; font-size: 12.5px; }
.gf-short .gf-side { grid-column: 2; grid-row: 1; }
.gf-short .gf-stage { grid-column: 2; grid-row: 2; }
.gf-short .gf-side:empty + .gf-stage { grid-row: 1 / span 2; }
.gf-short .bt-strip { margin: 0; }
.gf-short .rg-mode { padding: 5px 2px; font-size: 11.5px; }
.gf-short .rg-mode-t { white-space: normal; line-height: 1.08; text-align: center; }

@keyframes gf-pop { 0% { transform: scale(0.6); opacity: 0; } 70% { transform: scale(1.06); opacity: 1; } 100% { transform: scale(1); } }
.gf-banner { animation-name: gf-popx; }
@keyframes gf-popx { 0% { transform: translateX(-50%) scale(0.6); opacity: 0; } 70% { transform: translateX(-50%) scale(1.06); opacity: 1; } 100% { transform: translateX(-50%) scale(1); } }
@keyframes gf-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(85, 214, 255, 0.55); } 50% { box-shadow: 0 0 0 6px rgba(85, 214, 255, 0); } }
@keyframes gf-glow { 0%, 60% { box-shadow: 0 0 0 3px #7df0a0, 0 0 16px 4px rgba(125, 240, 160, 0.7); } 100% { box-shadow: 0 0 0 0 rgba(125, 240, 160, 0); } }
@keyframes gf-ripple { 0% { transform: translate(-50%, -50%) scale(0.3); opacity: 0; } 15% { opacity: 0.8; } 100% { transform: translate(-50%, -50%) scale(2.1); opacity: 0; } }
@keyframes gf-swim { 0% { transform: translate(0, 0) scaleX(-1); } 48% { transform: translate(520%, -160%) scaleX(-1); } 50% { transform: translate(520%, -160%) scaleX(1); } 98% { transform: translate(0, 0) scaleX(1); } 100% { transform: translate(0, 0) scaleX(-1); } }
@media (prefers-reduced-motion: reduce) {
  .gf-water i, .gf-swim, .gf-pod.gf-can, .gf-bubble, .gf-banner, .gf-bk.gf-bk-new, .gf-hc.gf-new { animation: none; }
  .gf-water i { display: none; }
  .gf-hc, .gf-pc, .gf-hand { transition: none; }
}
