/* Go Fish — Playnesta original (MIT). Table, chips, buttons. */
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}
body {
  background: radial-gradient(circle at 50% 18%, #1f3450, #152238 70%);
  color: #eaf1fb;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: calc(var(--pn-vh, 1vh) * 100);
  max-width: 560px;
  margin: 0 auto;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  gap: 8px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.brand {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.brand small {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.65;
  margin-left: 6px;
  text-transform: lowercase;
}
.meta {
  display: flex;
  gap: 10px;
  font-size: 14px;
  flex-wrap: wrap;
}
.table {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}
.side {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.side .who {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  opacity: 0.75;
}
.msg {
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  min-height: 24px;
}
.pond {
  position: relative;
  width: 76px;
  height: 96px;
  border-radius: 10px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pond .back {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: repeating-linear-gradient(45deg, #2c4a72, #2c4a72 6px, #233c5f 6px, #233c5f 12px);
  border: 2px solid #5b86c0;
}
.pond .hint {
  position: relative;
  z-index: 1;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.hand {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.chip {
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  min-height: 52px;
  min-width: 52px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 2px solid #5b86c0;
  background: #fdfdf6;
  color: #1d2638;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}
.chip small {
  font-size: 10px;
  font-weight: 600;
  opacity: 0.6;
}
.chip:disabled {
  opacity: 0.45;
  cursor: default;
}
.chip:not(:disabled):active {
  transform: scale(0.95);
}
.bookrow {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  min-height: 28px;
}
.book {
  font-size: 13px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 8px;
  background: #2c4a72;
  border: 1px solid #5b86c0;
}
.controls {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.btn {
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  min-height: 44px;
  min-width: 44px;
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid #5b86c0;
  background: #22385a;
  color: #eaf1fb;
  cursor: pointer;
}
.btn.primary {
  background: #5b86c0;
  color: #fff;
  border-color: #8fb4e4;
}
.btn:active {
  transform: scale(0.97);
}
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 16, 28, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 10;
}
.overlay.hidden {
  display: none;
}
.panel {
  background: #1d3050;
  border: 1px solid #5b86c0;
  border-radius: 16px;
  padding: 18px;
  max-width: 420px;
  width: 100%;
  max-height: 86vh;
  overflow: auto;
}
.panel h2 {
  margin: 0 0 10px;
  font-size: 20px;
}
.panel p {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.5;
}
.panel-wide {
  max-width: 520px;
}
.rules-list {
  margin: 0 0 14px;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.55;
}
.rules-list li {
  margin-bottom: 8px;
}
@media (max-height: 700px) {
  .pond {
    width: 62px;
    height: 80px;
  }
  .chip {
    min-height: 44px;
    min-width: 44px;
  }
}
