/* Go Fish table (gofish.js). DOM cards on a felt table. */
.gf { position: relative; width: 100%; box-sizing: border-box; display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 18px; overflow: hidden; min-height: 560px;
  background: radial-gradient(ellipse at 50% 45%, #1f8a5b 0%, #136943 55%, #0c4a30 100%); box-shadow: inset 0 0 0 6px #6b3f1d, inset 0 0 0 9px #8a5a2b, 0 10px 30px rgba(0, 0, 0, .35); color: #fff; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
.gf--kids { background: radial-gradient(ellipse at 50% 45%, #38bdf8 0%, #0ea5e9 50%, #0369a1 100%); box-shadow: inset 0 0 0 6px #f59e0b, inset 0 0 0 9px #fcd34d, 0 10px 30px rgba(0, 0, 0, .3); }
.gf-top { display: flex; gap: 10px; align-items: flex-start; }
.gf-opps { flex: 1; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.gf-tools { display: flex; gap: 6px; }
.gf-tbtn, .gf-tools .ak-mute { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .35); background: rgba(0, 0, 0, .25); color: #fff; font-size: 17px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }

.gf-opp { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-areas: "av name" "av count" "fan fan" "books books"; column-gap: 8px; align-items: center; text-align: left;
  min-width: 150px; padding: 8px 10px; border-radius: 14px; border: 2px solid rgba(255, 255, 255, .25); background: rgba(0, 0, 0, .22); color: #fff; cursor: pointer; transition: transform .15s, border-color .15s, box-shadow .15s; }
.gf-opp:disabled { cursor: default; }
.gf.is-myturn .gf-opp:not(:disabled):hover { transform: translateY(-2px); border-color: #fde047; }
.gf-opp.is-target { border-color: #fde047; box-shadow: 0 0 0 3px rgba(253, 224, 71, .45), 0 0 18px rgba(253, 224, 71, .5); }
.gf-opp.is-turn { border-color: #fff; box-shadow: 0 0 16px rgba(255, 255, 255, .55); }
.gf-opp:focus-visible { outline: 3px solid #fde047; outline-offset: 2px; }
.gf-av { grid-area: av; width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; background: var(--c); box-shadow: 0 0 0 3px rgba(255, 255, 255, .7); }
.gf-oname { grid-area: name; font-weight: 800; font-size: 15px; }
.gf-ocount { grid-area: count; font-size: 12px; opacity: .85; }
.gf-ofan { grid-area: fan; position: relative; height: 34px; margin-top: 4px; }
.gf-ofan i { position: absolute; left: 50%; top: 2px; width: 22px; height: 31px; margin-left: -11px; border-radius: 4px; border: 1.5px solid #fff; background: repeating-linear-gradient(45deg, #1d4ed8 0 4px, #2563eb 4px 8px);
  transform: translateX(calc(var(--k) * 9px)) rotate(calc(var(--k) * 5deg)); transform-origin: 50% 120%; box-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.gf-obooks { grid-area: books; display: flex; flex-wrap: wrap; gap: 3px; min-height: 4px; margin-top: 4px; }
.gf-bubble { position: absolute; left: 50%; top: calc(100% + 8px); transform: translateX(-50%) scale(.8); opacity: 0; z-index: 5; pointer-events: none; transition: opacity .2s, transform .2s;
  background: #fff; color: #0f172a; font-weight: 800; font-size: 14px; padding: 7px 12px; border-radius: 14px; white-space: nowrap; box-shadow: 0 4px 12px rgba(0, 0, 0, .3); }
.gf-bubble::before { content: ""; position: absolute; left: 50%; top: -7px; margin-left: -7px; border: 7px solid transparent; border-top: 0; border-bottom-color: #fff; }
.gf-bubble.is-on { opacity: 1; transform: translateX(-50%) scale(1); }
.gf-book { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 30px; padding: 0 4px; border-radius: 4px; background: #fff; color: #0f172a; font: 900 13px system-ui; box-shadow: 2px 2px 0 #cbd5e1, 4px 4px 0 #94a3b8; margin-right: 4px; }
.gf-book--sea { padding: 0; width: 30px; background: #fff; }
.gf-book--sea img { width: 26px; height: 26px; }
.is-pop { animation: gf-pop .6s ease-out; }
@keyframes gf-pop { 40% { transform: scale(1.08); } }

.gf-mid { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 160px; }
.gf-pond { position: relative; width: 190px; height: 120px; border-radius: 50%; border: 0; cursor: pointer; color: #fff;
  background: radial-gradient(ellipse at 45% 40%, #7dd3fc, #0284c7 60%, #075985); box-shadow: inset 0 -8px 20px rgba(0, 0, 0, .3), 0 0 0 5px rgba(255, 255, 255, .25); }
.gf--kids .gf-pond { box-shadow: inset 0 -8px 20px rgba(0, 0, 0, .3), 0 0 0 5px #fde68a; }
.gf-pond__stack { position: absolute; left: 50%; top: 42%; }
.gf-pond__stack i { position: absolute; width: 40px; height: 56px; margin: -28px 0 0 -20px; border-radius: 5px; border: 2px solid #fff; background: repeating-linear-gradient(45deg, #1d4ed8 0 5px, #2563eb 5px 10px);
  transform: translate(calc(var(--k) * 6px - 18px), calc(var(--k) * -2px)) rotate(calc(var(--k) * 11deg - 30deg)); box-shadow: 0 2px 4px rgba(0, 0, 0, .35); }
.gf-pond__n { position: absolute; left: 0; right: 0; bottom: 10px; font: 800 12px system-ui; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.gf-pond.is-empty .gf-pond__n { bottom: 50px; }
.gf-pond.is-call { animation: gf-call 0.9s ease-in-out infinite; box-shadow: inset 0 -8px 20px rgba(0, 0, 0, .3), 0 0 0 5px #fde047, 0 0 28px #fde047; }
@keyframes gf-call { 50% { transform: scale(1.06); } }
.gf-pond:focus-visible { outline: 3px solid #fde047; outline-offset: 4px; }
.gf-status { min-height: 26px; padding: 6px 14px; border-radius: 999px; background: rgba(0, 0, 0, .3); font-size: 15px; text-align: center; max-width: 100%; }

.gf-me { display: flex; flex-direction: column; gap: 8px; }
.gf-mebar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 42px; }
.gf-mebooks { display: flex; flex-wrap: wrap; gap: 2px; }
.gf-prompt { flex: 1; font-weight: 800; font-size: 16px; text-align: center; text-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
.gf-acts { display: flex; gap: 8px; }
.gf-ask { font-size: 16px; animation: gf-call 1.4s ease-in-out infinite; }
.gf-gofish { background: linear-gradient(180deg, #38bdf8, #0284c7); color: #fff; border: 0; font-weight: 900; font-size: 18px; padding: 10px 18px; border-radius: 12px; box-shadow: 0 4px 0 #075985; cursor: pointer; }
.gf-hand { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; min-height: 104px; padding: 4px; }

.gf-card { position: relative; width: 66px; height: 94px; border-radius: 8px; flex: 0 0 auto; padding: 0; font-family: Georgia, "Times New Roman", serif; }
.gf-card.is-up { background: linear-gradient(180deg, #fff, #f1f5f9); color: #111827; border: 1px solid #cbd5e1; box-shadow: 0 3px 6px rgba(0, 0, 0, .3); cursor: pointer; transition: transform .15s, box-shadow .15s; }
.gf-card.is-red { color: #dc2626; }
.gf-card.is-back { background: repeating-linear-gradient(45deg, #1d4ed8 0 5px, #2563eb 5px 10px); border: 3px solid #fff; box-shadow: 0 3px 6px rgba(0, 0, 0, .3); }
.gf-card.is-gap { margin-left: 10px; }
.gf.is-myturn .gf-hand .gf-card:hover { transform: translateY(-6px); }
.gf-card.is-sel { transform: translateY(-12px) !important; box-shadow: 0 0 0 3px #fde047, 0 8px 16px rgba(0, 0, 0, .35); }
.gf-card.is-asked { box-shadow: 0 0 0 3px #f97316, 0 0 16px #f97316; }
.gf-card:focus-visible { outline: 3px solid #fde047; outline-offset: 2px; }
.gf-corner { position: absolute; left: 5px; top: 4px; font-weight: 700; font-size: 15px; line-height: 1; text-align: center; }
.gf-corner--b { left: auto; top: auto; right: 5px; bottom: 4px; transform: rotate(180deg); }
.gf-pips { position: absolute; inset: 12px 12px; font-size: 14px; line-height: 1; }
.gf-pips i { position: absolute; font-style: normal; transform: translate(-50%, -50%); }
.gf-ace { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 40px; }
.gf-face { position: absolute; inset: 14px 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1.5px solid currentColor; border-radius: 6px; background: linear-gradient(180deg, rgba(250,204,21,.18), rgba(250,204,21,.04)); line-height: 1; }
.gf-face i { font-style: normal; font-size: 20px; } .gf-face b { font-size: 24px; } .gf-face small { font-size: 13px; }
.gf-card.is-sea { width: 78px; height: 104px; font-family: system-ui, sans-serif; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.gf-pic { width: 66px; height: 66px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.gf-pic img { width: 64px; height: 64px; }
.gf-name { font: 800 11px system-ui, sans-serif; color: #0f172a; }
.gf-fly { position: absolute; z-index: 40; pointer-events: none; margin: 0; }

.gf-modal { position: absolute; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .5); padding: 14px; }
.gf-modal[hidden] { display: none; }
.gf-modal__card { width: min(440px, 100%); max-height: 100%; overflow: auto; background: #0f1d33; border: 1px solid rgba(255, 255, 255, .2); border-radius: 16px; padding: 16px 20px; text-align: center; }
.gf-modal__card h3 { margin: 0 0 10px; font-size: 24px; }
.gf-rules { text-align: left; } .gf-rules ol { padding-left: 20px; line-height: 1.5; font-size: 14px; }
.gf-score { list-style: none; padding: 0; margin: 0 0 12px; }
.gf-score li { display: flex; justify-content: space-between; padding: 6px 10px; border-radius: 8px; font-size: 16px; }
.gf-score li:first-child { background: rgba(250, 204, 21, .18); }
.gf-score li.is-me { outline: 2px solid #38bdf8; }
.gf-modal__btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.gf-conf { position: absolute; top: 0; width: 8px; height: 12px; border-radius: 2px; z-index: 70; pointer-events: none; }
.gf-setup-help { margin-top: 14px; font-size: 13px; line-height: 1.5; opacity: .9; }
.gf-setup-help kbd { background: var(--color-bg-alt, #1c1f27); border: 1px solid var(--color-border, #333); border-radius: 5px; padding: 0 5px; font: 700 12px ui-monospace, monospace; }

@media (max-width: 600px) {
  .gf { padding: 10px; min-height: 520px; gap: 8px; }
  .gf-top { flex-direction: column-reverse; align-items: stretch; }
  .gf-tools { justify-content: flex-end; }
  .gf-opps { gap: 6px; }
  .gf-opp { min-width: 0; flex: 1 1 calc(50% - 6px); grid-template-columns: auto 1fr; padding: 6px; }
  .gf-av { width: 36px; height: 36px; font-size: 22px; }
  .gf-oname { font-size: 13px; }
  .gf-ofan { height: 28px; }
  .gf-ofan i { width: 18px; height: 26px; margin-left: -9px; transform: translateX(calc(var(--k) * 6px)) rotate(calc(var(--k) * 5deg)); }
  .gf-pond { width: 150px; height: 96px; }
  .gf-status { font-size: 13px; }
  .gf-card { width: 52px; height: 74px; }
  .gf-corner { font-size: 12px; } .gf-pips { inset: 10px 8px; font-size: 10.5px; } .gf-ace { font-size: 30px; } .gf-face { inset: 11px 9px; } .gf-face i { font-size: 14px; } .gf-face b { font-size: 18px; } .gf-face small { font-size: 10px; }
  .gf-card.is-sea { width: 62px; height: 84px; } .gf-pic { width: 52px; height: 52px; } .gf-pic img { width: 50px; height: 50px; } .gf-name { font-size: 9.5px; }
  .gf-hand { gap: 4px; }
  .gf-card.is-gap { margin-left: 6px; }
  .gf-bubble { font-size: 12px; white-space: normal; width: max-content; max-width: 160px; text-align: center; }
}
@media (prefers-reduced-motion: reduce) { .gf-pond.is-call, .gf-ask { animation: none; } .gf-card.is-up { transition: none; } }
