/* Go Fish: an ocean table, sea-creature friends, a pond and big rank groups. Card look from
   /shared/cards/cards.css (restyled here with a big centre number), layout and buttons from cb-arcade.css. */
.gf-page [hidden] { display: none !important; }
.gf-page { --cb-felt-1: #3aa3e8; --cb-felt-2: #135ea8; --gf-gold: #ffd166; }

.gf-card { padding: 12px; }

/* ---- the table ---- */
.gf-table { position: relative; border-radius: 20px; padding: 10px 8px 14px; overflow: hidden; color: #fff;
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .1), inset 0 10px 30px rgba(0, 0, 0, .18); }
.gf-table::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: radial-gradient(14px 6px at 12% 48%, rgba(255, 255, 255, .18), transparent 70%), radial-gradient(18px 7px at 86% 56%, rgba(255, 255, 255, .15), transparent 70%),
    radial-gradient(10px 5px at 70% 92%, rgba(255, 255, 255, .15), transparent 70%); }

/* friends along the top */
.gf-friends { position: relative; display: flex; justify-content: space-around; gap: 6px; }
.gf-seat { --cw: 20px; position: relative; flex: 1 1 0; max-width: 150px; min-width: 0; display: grid; justify-items: center; gap: 3px;
  padding: 8px 4px 6px; border: 0; border-radius: 18px; background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer;
  font-family: var(--cbx-body); -webkit-tap-highlight-color: transparent; transition: background .2s, transform .2s, box-shadow .2s; }
.gf-face { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; font-size: 38px; line-height: 1;
  background: radial-gradient(circle at 35% 30%, #fff, color-mix(in srgb, var(--fc) 30%, #fff)); box-shadow: 0 0 0 3px var(--fc), 0 4px 10px rgba(0, 0, 0, .25); }
.gf-name { font: 900 15px var(--cbx-body); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gf-fan { --ov: -.6; min-height: calc(var(--cw) * 1.4); }
.gf-fan em { font: 800 12px var(--cbx-body); font-style: normal; opacity: .8; line-height: calc(var(--cw) * 1.4); }
.gf-fan .cb-card.down { box-shadow: inset 0 0 0 2px #fff, 0 1px 2px rgba(0, 0, 0, .3); }
.gf-stars { font: 900 14px var(--cbx-body); padding: 1px 9px; border-radius: 99px; background: rgba(0, 0, 0, .22); }
.gf-seat.turn { background: rgba(255, 209, 102, .25); box-shadow: inset 0 0 0 3px var(--gf-gold); }
.gf-seat.turn .gf-face { animation: gf-bob 1.2s ease-in-out infinite; }
.gf-seat.pick { background: rgba(255, 255, 255, .25); box-shadow: inset 0 0 0 3px #fff; }
.gf-seat.pick .gf-face { animation: gf-call 1.1s ease-in-out infinite; }
.gf-seat.pick.hint, .gf-seat.hint { box-shadow: inset 0 0 0 4px var(--gf-gold), 0 0 18px rgba(255, 209, 102, .8); }
.gf-seat.out { opacity: .6; }
.gf-seat.asked { background: rgba(255, 255, 255, .3); box-shadow: inset 0 0 0 4px #fff; }
.gf-me.asked { background: rgba(255, 255, 255, .2); box-shadow: inset 0 0 0 4px #fff; }
.gf-bubble b { color: var(--cbx-accent); }
.gf-seat:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
@keyframes gf-bob { 50% { transform: translateY(-4px) rotate(-4deg); } }
@keyframes gf-call { 50% { transform: translateY(-3px); } }
.gf-friends[data-n="3"] .gf-face { width: 50px; height: 50px; font-size: 32px; }
.gf-friends[data-n="3"] .gf-name { font-size: 14px; }
.gf-friends[data-n="3"] .gf-seat { --cw: 16px; }

/* the pond */
.gf-mid { display: flex; justify-content: center; margin: 12px 0 4px; }
.gf-pond { --cw: 34px; position: relative; width: 220px; height: 92px; display: grid; place-items: center; }
.gf-water { position: absolute; inset: 0; border-radius: 50%; overflow: hidden;
  background: radial-gradient(60% 60% at 50% 40%, #8fe3f0, #3fb6d6 60%, #1f8fbf); box-shadow: 0 0 0 5px #f4d9a0, 0 0 0 9px rgba(244, 217, 160, .35), inset 0 6px 14px rgba(0, 0, 0, .18); }
.gf-water::after { content: ''; position: absolute; inset: 18% 12%; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); animation: gf-ripple 3.5s ease-out infinite; }
@keyframes gf-ripple { from { transform: scale(.5); opacity: 1; } to { transform: scale(1.15); opacity: 0; } }
.gf-swim { position: absolute; top: 58%; left: -20%; font-size: 20px; font-style: normal; animation: gf-swim 9s linear infinite; }
.gf-swim.two { top: 18%; font-size: 16px; animation-duration: 12s; animation-delay: -5s; }
@keyframes gf-swim { from { left: -15%; } to { left: 110%; } }
.gf-pile { position: relative; width: 90px; height: calc(var(--cw) * 1.4); }
.gf-pile .cb-card { position: absolute; top: 0; left: 28px; }
.gf-pile .p0 { transform: translate(-26px, 4px) rotate(-18deg); }
.gf-pile .p1 { transform: translate(22px, 6px) rotate(14deg); }
.gf-pile .p2 { transform: translate(-10px, -4px) rotate(-6deg); }
.gf-pile .p3 { transform: translate(10px, -2px) rotate(8deg); }
.gf-pile .p4 { transform: translate(-2px, 2px) rotate(-2deg); }
.gf-pile .p5 { transform: translate(4px, 0) rotate(3deg); }
.gf-left { position: absolute; right: -6px; top: -6px; min-width: 30px; padding: 3px 8px; border-radius: 99px; background: #fff; color: #135ea8; font: 900 15px var(--cbx-body); text-align: center; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
.gf-pond.empty .gf-left { font-size: 13px; }

/* prompt */
.gf-prompt, .cbx-card .gf-prompt { position: relative; margin: 8px 0 6px; min-height: 52px; display: grid; align-content: center; justify-items: center; gap: 3px;
  text-align: center; font: 900 19px/1.3 var(--cbx-body); color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.gf-prompt .gf-note { font: 900 16px var(--cbx-body); color: var(--gf-gold); }
.gf-prompt .gf-bad { color: #fff; background: rgba(0, 0, 0, .25); padding: 4px 12px; border-radius: 99px; }
.gf-chip { display: inline-grid; place-items: center; vertical-align: middle; min-width: 30px; height: 40px; padding: 0 4px; margin: 0 2px; border-radius: 6px;
  background: #fffdf8; color: #1f2433; font: 900 22px/1 var(--cbx-body); box-shadow: 0 0 0 1px #d9d2c4, 0 2px 4px rgba(0, 0, 0, .2); text-shadow: none; }

/* me: sets tray and hand */
.gf-me { display: grid; gap: 8px; border-radius: 18px; padding: 8px 4px 6px; transition: background .2s; }
.gf-me.turn { background: rgba(255, 209, 102, .14); box-shadow: inset 0 0 0 2px rgba(255, 209, 102, .6); }
.gf-tray { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 8px; border-radius: 14px; background: rgba(0, 0, 0, .16); }
.gf-tlabel { font: 900 14px var(--cbx-body); white-space: nowrap; }
.gf-tlabel b { color: var(--gf-gold); }
.gf-tsets { display: flex; flex-wrap: wrap; gap: 4px; }
.gf-tsets .gf-chip { min-width: 24px; height: 32px; font-size: 17px; margin: 0; box-shadow: 0 0 0 2px var(--gf-gold); animation: gf-pop .4s ease-out; }
.gf-tempty { font: 800 13px var(--cbx-body); opacity: .8; }

.gf-hand { --cw: 66px; --step: 20px; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 8px; padding-top: 10px; min-height: calc(var(--cw) * 1.4 + 26px); }
.gf-group { position: relative; display: grid; justify-items: center; gap: 5px; border: 0; padding: 0; background: none; cursor: pointer; border-radius: 10px;
  -webkit-tap-highlight-color: transparent; transition: transform .15s ease; }
.gf-cards { display: flex; }
.gf-cards > .cb-card + .cb-card { margin-left: calc(var(--step) - var(--cw)); }
.gf-group .cb-card { pointer-events: none; }
.gf-dots { display: flex; gap: 3px; }
.gf-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .28); }
.gf-dots i.on { background: var(--gf-gold); }
.gf-group.sel { transform: translateY(-12px); }
.gf-group.sel .cb-card { box-shadow: 0 0 0 3px var(--cb-card-sel), 0 6px 14px rgba(0, 0, 0, .3); }
.gf-group.hint .cb-card { animation: gf-glow 1.4s ease-in-out infinite; }
@keyframes gf-glow { 0%, 100% { box-shadow: 0 0 0 1px var(--cb-card-edge), 0 2px 4px rgba(0, 0, 0, .18); } 50% { box-shadow: 0 0 0 4px var(--gf-gold), 0 0 18px 4px rgba(255, 209, 102, .85); } }
.gf-group.wait .cb-card { filter: brightness(.9); }
.gf-group .cb-card.fresh { box-shadow: 0 0 0 3px #fff, 0 0 16px 4px rgba(255, 255, 255, .8); }
.gf-group:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.nope { animation: gf-shake .35s; }
@keyframes gf-shake { 25% { translate: -6px 0; } 75% { translate: 6px 0; } }
.gf-empty, .cbx-card .gf-empty { margin: 20px 0; font: 900 16px var(--cbx-body); color: var(--gf-gold); }

/* big centre number on number cards and aces (faces keep the kit's J / Q / K) */
.gf-page .gf-c:not(.face)::after { content: attr(data-r); position: absolute; left: 0; right: 0; top: 22%; text-align: center;
  font: 900 calc(var(--w) * .5)/1 var(--cbx-body); letter-spacing: -.05em; }
.gf-page .gf-c:not(.face) .cc-c { align-items: end; padding-bottom: 14%; }
.gf-page .gf-c:not(.face) .cc-c i { font-size: calc(var(--w) * .26); }

/* speech bubbles */
.gf-bubbles { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
.gf-bubble { position: absolute; --tail: 50%; display: flex; align-items: center; gap: 8px; max-width: min(260px, 86%); padding: 8px 14px; border-radius: 18px;
  background: #fff; color: #1f2433; font: 900 18px/1.25 var(--cbx-body); box-shadow: 0 6px 18px rgba(0, 0, 0, .3); animation: gf-pop .3s cubic-bezier(.3, 1.6, .5, 1); }
.gf-bubble::before { content: ''; position: absolute; left: var(--tail); width: 16px; height: 16px; background: inherit; transform: translateX(-50%) rotate(45deg); }
.gf-bubble.them::before { top: -7px; }
.gf-bubble.me::before { bottom: -7px; }
.gf-bubble.fish { background: #ffe9a8; font-size: 22px; }
.gf-bubble.yes { background: #d8f7e2; }
.gf-bubble .gf-chip { flex: none; }
@keyframes gf-pop { from { transform: scale(.5); opacity: 0; } }

/* splash: lucky fish and sets */
.gf-splash { position: absolute; inset: 0; z-index: 6; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 16px;
  background: rgba(8, 40, 80, .55); pointer-events: none; text-align: center; }
.gf-splash b { font: 900 24px/1.25 var(--cbx-body); color: #fff; text-shadow: 0 2px 6px rgba(0, 0, 0, .5); }
.gf-splash .gf-four { --cw: 64px; --ov: -.45; }
.gf-splash .gf-luckycard { --cw: 96px; }
.gf-splash.pop .gf-four, .gf-splash.pop .gf-luckycard { animation: gf-spin .55s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes gf-spin { from { transform: scale(.2) rotate(-25deg); opacity: 0; } }

.gf-fly { position: fixed; z-index: 2000; pointer-events: none; transform-origin: 0 0; }
.gf-fly .cb-card { box-shadow: 0 10px 24px rgba(0, 0, 0, .35); }

/* game over and welcome back: cards over the table */
.gf-over { position: absolute; inset: 0; z-index: 8; display: grid; place-items: center; padding: 14px; background: rgba(8, 40, 80, .6); }
.gf-over-card { width: min(340px, 100%); max-height: 100%; overflow: auto; display: grid; gap: 10px; padding: 18px 16px; border-radius: 22px; background: #fff; color: var(--cbx-ink); text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .35); animation: gf-pop .35s ease-out; }
.gf-over-card h2 { margin: 0; font: 900 30px/1.1 var(--cbx-display); }
.gf-big { font-size: 60px; line-height: 1; }
.cbx-card .gf-sub { margin: 0; font: 800 16px var(--cbx-body); color: var(--cbx-muted); }
.gf-rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.gf-rank li { display: grid; grid-template-columns: 34px auto 1fr auto; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 12px; background: var(--cbx-soft); font: 900 16px var(--cbx-body); text-align: left; }
.gf-rank li.win { background: #fff3cc; box-shadow: inset 0 0 0 2px var(--gf-gold); }
.gf-rank .f { font-size: 26px; }
.gf-rank .s { display: flex; flex-wrap: wrap; gap: 2px; min-width: 0; }
.gf-rank .s .gf-chip { min-width: 16px; height: 22px; font-size: 12px; padding: 0 2px; margin: 0; }
.gf-rank .n { white-space: nowrap; }
.gf-over .cbx-btn.gold { min-height: 60px; font-size: 20px; }

/* ---- setup ---- */
.gf-setup { display: grid; gap: 8px; margin-top: 12px; padding: 10px; border-radius: 14px; background: var(--cbx-soft); }
.gf-opt { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gf-opt > span { font: 900 14px var(--cbx-body); color: var(--cbx-ink-2); }
.gf-seg { display: flex; gap: 4px; background: #fff; padding: 3px; border-radius: 99px; }
.gf-seg button { display: block; border: 0; min-height: 40px; padding: 6px 12px; border-radius: 99px; background: transparent; font: 900 15px var(--cbx-body); color: var(--cbx-muted); cursor: pointer; white-space: nowrap; }
#optOpps button, #optSpeed button { font-size: 20px; padding: 4px 10px; letter-spacing: -.1em; }
.gf-seg button[aria-pressed="true"] { background: var(--cbx-accent); color: #fff; }
#optOpps button[aria-pressed="true"], #optSpeed button[aria-pressed="true"] { background: #cfe6fb; box-shadow: inset 0 0 0 2px var(--cbx-accent); }
.cbx-card .gf-stats { margin: 2px 0 0; text-align: center; font: 800 14px var(--cbx-body); color: var(--cbx-muted); }
.gf-stats b { color: var(--cbx-ink); }
.gf-foot { display: flex; justify-content: center; margin-top: 10px; }

@media (min-width: 640px) {
  .gf-table { padding: 16px 18px 20px; }
  .gf-seat { --cw: 24px; }
  .gf-face, .gf-friends[data-n="3"] .gf-face { width: 70px; height: 70px; font-size: 46px; }
  .gf-pond { width: 280px; height: 110px; --cw: 40px; }
  .gf-prompt { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) {
  .gf-seat, .gf-face, .gf-group .cb-card, .gf-swim, .gf-water::after, .gf-bubble, .gf-splash *, .gf-over-card, .gf-tsets .gf-chip { animation: none !important; }
  .gf-group.hint .cb-card { box-shadow: 0 0 0 4px var(--gf-gold), 0 0 18px 4px rgba(255, 209, 102, .85); }
}
