.go-fish-game {
  --gf-ink: #17333b;
  --gf-muted: #61747a;
  --gf-panel: rgba(255, 255, 255, 0.9);
  --gf-line: rgba(37, 78, 83, 0.2);
  --gf-gold: #d99b29;
  --gf-sea: #087f8c;
  color: var(--gf-ink);
  display: grid;
  gap: 18px;
  isolation: isolate;
  max-width: 100%;
  min-width: 0;
}

.dark .go-fish-game {
  --gf-ink: #effbf8;
  --gf-muted: #adc5c3;
  --gf-panel: rgba(10, 28, 32, 0.92);
  --gf-line: rgba(180, 225, 218, 0.2);
}

.go-fish-game .gf-sr-only {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.go-fish-game .gf-hero,
.go-fish-game .gf-table-panel,
.go-fish-game .gf-side-panel,
.go-fish-game .gf-hud article {
  backdrop-filter: blur(18px);
  background: var(--gf-panel);
  border: 1px solid var(--gf-line);
  box-shadow: 0 20px 55px rgba(21, 55, 59, 0.12);
}

.go-fish-game .gf-hero {
  align-items: center;
  background:
    radial-gradient(
      circle at 78% 0%,
      rgba(112, 215, 220, 0.3),
      transparent 17rem
    ),
    radial-gradient(
      circle at 8% 105%,
      rgba(238, 177, 65, 0.25),
      transparent 18rem
    ),
    var(--gf-panel);
  border-radius: 30px;
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr auto minmax(220px, auto);
  min-height: 185px;
  overflow: hidden;
  padding: 28px 32px;
}

.go-fish-game .gf-hero h1 {
  font-size: clamp(2.6rem, 6vw, 5rem);
  font-weight: 950;
  letter-spacing: -0.07em;
  line-height: 0.9;
  margin: 7px 0 15px;
}

.go-fish-game .gf-hero p:not(.gf-eyebrow) {
  color: var(--gf-muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
  font-weight: 650;
  line-height: 1.5;
  margin: 0;
  max-width: 620px;
}

.go-fish-game .gf-hero > img {
  filter: drop-shadow(0 12px 16px rgba(15, 55, 60, 0.18));
  max-width: 120px;
}

.go-fish-game .gf-eyebrow {
  color: var(--gf-sea);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  margin: 0;
  text-transform: uppercase;
}

.dark .go-fish-game .gf-eyebrow {
  color: #75dbe0;
}

.go-fish-game .gf-top-actions,
.go-fish-game .gf-table-actions,
.go-fish-game .gf-primary-actions,
.go-fish-game .gf-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.go-fish-game button,
.go-fish-game select,
.go-fish-game input {
  accent-color: var(--gf-sea);
}

.go-fish-game button:focus-visible,
.go-fish-game select:focus-visible,
.go-fish-game input:focus-visible,
.go-fish-game summary:focus-visible {
  outline: 3px solid #f3b83e;
  outline-offset: 3px;
}

.go-fish-game .gf-hud {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.go-fish-game .gf-hud article {
  border-radius: 18px;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 13px 16px;
}

.go-fish-game .gf-hud span {
  color: var(--gf-muted);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.go-fish-game .gf-hud strong {
  font-size: clamp(0.96rem, 2vw, 1.25rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.go-fish-game .gf-hud strong span {
  color: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  text-transform: none;
}

.go-fish-game .gf-layout {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.75fr) minmax(300px, 0.65fr);
}

.go-fish-game .gf-table-panel,
.go-fish-game .gf-side-panel {
  border-radius: 26px;
  min-width: 0;
  padding: 21px;
}

.go-fish-game .gf-table-panel,
.go-fish-game .gf-side-panel,
.go-fish-game .gf-side-panel section,
.go-fish-game .gf-settings,
.go-fish-game .gf-public-state {
  display: grid;
  gap: 15px;
}

.go-fish-game .gf-side-panel section {
  border-bottom: 1px solid var(--gf-line);
  padding-bottom: 16px;
}

.go-fish-game .gf-side-panel section:last-of-type {
  border-bottom: 0;
}

.go-fish-game .gf-heading-row,
.go-fish-game .gf-player-heading,
.go-fish-game .gf-result-row {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.go-fish-game h2,
.go-fish-game h3,
.go-fish-game p {
  margin-top: 0;
}

.go-fish-game h2 {
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  margin-bottom: 0;
}

.go-fish-game h3 {
  font-size: 1.05rem;
  font-weight: 850;
  margin-bottom: 0;
}

.go-fish-game .gf-canvas-shell {
  aspect-ratio: 30 / 19;
  background: #0a2d28;
  border: 1px solid rgba(218, 174, 77, 0.45);
  border-radius: 23px;
  overflow: hidden;
  position: relative;
}

.go-fish-game canvas {
  display: block;
  height: 100%;
  outline: none;
  touch-action: pan-y;
  width: 100%;
}

.go-fish-game canvas:focus-visible {
  box-shadow: inset 0 0 0 4px #ffe08a;
}

.go-fish-game .gf-pause-cover {
  align-content: center;
  background: rgba(3, 14, 20, 0.78);
  color: #fff;
  inset: 0;
  justify-items: center;
  position: absolute;
  z-index: 2;
}

.go-fish-game .gf-pause-cover:not([hidden]) {
  display: grid;
}

.go-fish-game .gf-pause-cover strong {
  font-size: clamp(1.8rem, 5vw, 3.4rem);
}

.go-fish-game .gf-host {
  align-items: center;
  background: linear-gradient(
    135deg,
    rgba(227, 248, 245, 0.95),
    rgba(255, 246, 210, 0.94)
  );
  border: 1px solid rgba(24, 119, 123, 0.22);
  border-radius: 20px;
  color: #17333b;
  display: flex;
  gap: 14px;
  min-height: 86px;
  padding: 10px 17px;
}

.go-fish-game .gf-host img {
  flex: none;
}

.go-fish-game .gf-host p {
  font-weight: 620;
  line-height: 1.45;
  margin: 3px 0 0;
}

.go-fish-game .gf-request,
.go-fish-game .gf-public-state {
  background: color-mix(in srgb, var(--gf-panel) 88%, #caeee8);
  border: 1px solid var(--gf-line);
  border-radius: 21px;
  padding: 17px;
}

.go-fish-game .gf-request-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(190px, 0.7fr) minmax(0, 1.3fr);
}

.go-fish-game fieldset {
  border: 1px solid var(--gf-line);
  border-radius: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  min-width: 0;
  padding: 12px;
}

.go-fish-game legend {
  font-size: 0.79rem;
  font-weight: 850;
  padding: 0 5px;
}

.go-fish-game .gf-choice {
  align-items: center;
  background: color-mix(in srgb, var(--gf-panel) 90%, transparent);
  border: 1px solid var(--gf-line);
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 760;
  min-height: 42px;
  padding: 6px 11px;
}

.go-fish-game .gf-choice.selected {
  background: #d7f3ee;
  border-color: #087f8c;
  box-shadow: 0 0 0 2px rgba(8, 127, 140, 0.15);
  color: #17333b;
}

.go-fish-game .gf-choice input {
  margin-right: 7px;
}

.go-fish-game .gf-player-list {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.go-fish-game .gf-player-card {
  border: 1px solid var(--gf-line);
  border-radius: 14px;
  padding: 11px 13px;
}

.go-fish-game .gf-player-card.active {
  border-color: var(--gf-gold);
  box-shadow: inset 0 0 0 2px rgba(217, 155, 41, 0.2);
}

.go-fish-game .gf-player-card p {
  color: var(--gf-muted);
  font-size: 0.82rem;
  margin: 6px 0 0;
}

.go-fish-game .gf-history {
  color: var(--gf-muted);
  display: grid;
  font-size: 0.85rem;
  gap: 6px;
  margin-bottom: 0;
  padding-left: 24px;
}

.go-fish-game .gf-settings label,
.go-fish-game .gf-side-panel section > label {
  color: var(--gf-muted);
  display: grid;
  font-size: 0.75rem;
  font-weight: 820;
  gap: 6px;
}

.go-fish-game .gf-switch {
  align-items: center;
  display: flex !important;
  font-size: 0.87rem !important;
  min-height: 36px;
}

.go-fish-game .gf-switch input {
  height: 19px;
  width: 19px;
}

.go-fish-game .gf-speed button {
  background: transparent;
  border: 1px solid var(--gf-line);
  border-radius: 10px;
  color: var(--gf-ink);
  font-weight: 850;
  min-height: 38px;
  min-width: 48px;
}

.go-fish-game .gf-speed button[aria-pressed="true"] {
  background: var(--gf-sea);
  color: #fff;
}

.go-fish-game .gf-stage-list {
  display: grid;
  gap: 6px;
}

.go-fish-game .gf-stage-list span {
  border-left: 3px solid var(--gf-line);
  color: var(--gf-muted);
  font-size: 0.82rem;
  padding: 5px 9px;
}

.go-fish-game .gf-stage-list .complete {
  border-color: #2a9d6f;
  color: var(--gf-ink);
}

.go-fish-game .gf-stage-list .current {
  border-color: var(--gf-gold);
  color: var(--gf-ink);
  font-weight: 800;
}

.go-fish-game .gf-stats {
  display: grid;
  gap: 6px 12px;
  grid-template-columns: 1fr auto;
  margin: 0;
}

.go-fish-game .gf-stats dt,
.go-fish-game .gf-stats dd {
  border-bottom: 1px dashed var(--gf-line);
  font-size: 0.83rem;
  margin: 0;
  padding-bottom: 4px;
}

.go-fish-game .gf-stats dd {
  font-weight: 900;
}

.go-fish-game .gf-achievements {
  display: grid;
  gap: 7px;
  list-style: none;
  margin: 0;
  max-height: 290px;
  overflow: auto;
  padding: 0;
}

.go-fish-game .gf-achievements li {
  border: 1px solid var(--gf-line);
  border-radius: 10px;
  display: grid;
  font-size: 0.76rem;
  gap: 2px;
  padding: 8px 10px;
}

.go-fish-game .gf-achievements .locked {
  opacity: 0.57;
}

.go-fish-game .gf-achievements .unlocked strong {
  color: #a66a00;
}

.go-fish-game .gf-dialog {
  background: var(--gf-panel);
  border: 1px solid var(--gf-line);
  border-radius: 24px;
  color: var(--gf-ink);
  max-height: min(84vh, 760px);
  max-width: min(720px, calc(100vw - 28px));
  overflow: auto;
  padding: 25px;
  width: 100%;
}

.go-fish-game .gf-dialog::backdrop {
  backdrop-filter: blur(8px);
  background: rgba(3, 17, 24, 0.72);
}

.go-fish-game .gf-rules {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 18px 0;
}

.go-fish-game .gf-rules section {
  background: color-mix(in srgb, var(--gf-panel) 88%, #c7eee8);
  border: 1px solid var(--gf-line);
  border-radius: 14px;
  padding: 13px;
}

.go-fish-game .gf-rules p {
  color: var(--gf-muted);
  font-size: 0.88rem;
  line-height: 1.5;
  margin: 6px 0 0;
}

.go-fish-game .gf-results {
  display: grid;
  gap: 7px;
  margin: 16px 0;
}

.go-fish-game .gf-result-row {
  border: 1px solid var(--gf-line);
  border-radius: 12px;
  padding: 10px 12px;
}

.go-fish-game[data-learning="true"] .gf-choice,
.go-fish-game[data-learning="true"] button,
.go-fish-game[data-learning="true"] select {
  min-height: 50px;
}

.go-fish-game[data-learning="true"] .gf-rank-choice {
  font-size: 1rem;
}

.go-fish-game[data-learning="true"] [data-gf-progress-panel] {
  display: none;
}

@media (max-width: 1100px) {
  .go-fish-game .gf-layout {
    grid-template-columns: 1fr;
  }

  .go-fish-game .gf-side-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .go-fish-game .gf-side-panel > .button-danger {
    align-self: end;
  }
}

@media (max-width: 760px) {
  .go-fish-game .gf-hero {
    grid-template-columns: 1fr auto;
    padding: 22px;
  }

  .go-fish-game .gf-hero > img {
    width: 88px;
  }

  .go-fish-game .gf-top-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .go-fish-game .gf-hud {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .go-fish-game .gf-hud article:first-child {
    grid-column: 1 / -1;
  }

  .go-fish-game .gf-table-panel,
  .go-fish-game .gf-side-panel {
    border-radius: 19px;
    padding: 13px;
  }

  .go-fish-game .gf-side-panel,
  .go-fish-game .gf-request-grid,
  .go-fish-game .gf-player-list,
  .go-fish-game .gf-rules {
    grid-template-columns: 1fr;
  }

  .go-fish-game .gf-heading-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .go-fish-game .gf-table-actions,
  .go-fish-game .gf-primary-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .go-fish-game .gf-host img {
    height: 52px;
    width: 52px;
  }
}

@media (max-width: 600px) {
  .go-fish-game .gf-canvas-shell {
    aspect-ratio: auto;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }

  .go-fish-game canvas {
    aspect-ratio: 30 / 19;
    height: auto;
    max-width: none;
    min-width: 680px;
    touch-action: pan-x pan-y;
    width: 680px;
  }

  .go-fish-game .gf-choice {
    min-height: 46px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .go-fish-game *,
  .go-fish-game *::before,
  .go-fish-game *::after {
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
