* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh;
  font: 17px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #0d3b5c;
  background: linear-gradient(#bfe9ff, #7cc7f2 60%, #4aa3df);
  background-attachment: fixed;
}
.hidden { display: none !important; }
.screen { max-width: 560px; margin: 0 auto; padding: 16px 16px 48px; }
.logo { text-align: center; font-size: 40px; margin: 32px 0 16px; }
h2, h3 { margin: 0 0 8px; }
.card { background: #fffffff0; border-radius: 20px; padding: 16px; margin: 12px 0; box-shadow: 0 4px 14px #0002; }
label { display: block; margin: 8px 0; font-weight: 600; }
input, select {
  width: 100%; font: inherit; padding: 12px; border-radius: 12px;
  border: 2px solid #9fd3f2; background: #fff; margin-top: 4px;
}
button, .button {
  font: inherit; font-weight: 600; border: 0; border-radius: 14px; padding: 10px 16px;
  background: #ffcf3f; color: #5a3b00; cursor: pointer; text-decoration: none; display: inline-block;
}
button:active, .button:active { transform: scale(.97); }
button.big, label.big {
  display: block; width: 100%; padding: 22px; font-size: 22px; text-align: center;
  border-radius: 24px; background: #ff8a3d; color: #fff; box-shadow: 0 6px 0 #d4621a; cursor: pointer;
}
label.camera { margin: 16px 0 8px; }
.small-link { text-align: center; font-weight: 500; text-decoration: underline; cursor: pointer; }
button.icon { background: #fff9; font-size: 22px; padding: 8px 12px; }
button.danger { background: #ffe0e0; color: #a12020; margin-top: 8px; }
button.wide { width: 100%; padding: 14px; }
.tabs { display: flex; gap: 8px; }
.tab { flex: 1; background: #fff8; }
.tab.active { background: #fff; }
.top { display: flex; gap: 8px; align-items: center; }
.top select { flex: 1; margin: 0; font-weight: 700; }
.top h2 { margin: 0; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row input { flex: 1; margin: 0; min-width: 140px; }
.link { word-break: break-all; background: #eef8ff; padding: 10px; border-radius: 10px; margin: 8px 0; font-family: monospace; font-size: 14px; }
.hint, .note { color: #2d5f80; font-size: 15px; margin: 4px 0; }
.note { text-align: center; }
.empty { text-align: center; font-size: 20px; margin-top: 40px; }
.fish-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 12px; }
.fish-card { background: #fffffff0; border-radius: 20px; padding: 10px; text-align: center; box-shadow: 0 4px 12px #0002; }
.fish-card .pic { height: 110px; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.fish-card .pic img { max-width: 100%; max-height: 110px; }
.fish-card .pic img.flipped { transform: scaleX(-1); }
.fish-card .name { font-weight: 800; font-size: 18px; margin-top: 4px; }
.fish-card .trait { font-size: 13px; color: #2d5f80; min-height: 1em; }
.fish-card .actions { display: flex; justify-content: center; gap: 6px; margin-top: 6px; }
.fish-card .actions button { padding: 6px 10px; background: #eef8ff; }
.fish-card.failed .pic { color: #a12020; }
.swim { animation: swim 1.4s ease-in-out infinite alternate; font-size: 40px; }
@keyframes swim { from { transform: translateX(-14px) rotate(-6deg); } to { transform: translateX(14px) rotate(6deg); } }
#members { list-style: none; padding: 0; margin: 0; }
#members li { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid #e3f2fb; }
#members li button { padding: 4px 10px; background: #ffe0e0; color: #a12020; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 10;
  background: #0d3b5c; color: #fff; padding: 12px 18px; border-radius: 14px; max-width: 90vw; text-align: center;
}
