:root {
  --bg: #02040a;
  --ink: #d6e8ff;
  --muted: #7f97bd;
  --faint: #3b4f72;
  --line: rgba(140, 190, 255, 0.16);
  --glass: rgba(10, 20, 40, 0.72);
  --cyan: #4ff3ff;
  --blue: #4a8dff;
  --violet: #a67bff;
  --pink: #ff6fd8;
  --mint: #5dffb0;
  --amber: #ffcf5a;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background:
    radial-gradient(60% 45% at 50% 42%, rgba(40, 120, 255, 0.10), transparent 70%),
    radial-gradient(40% 30% at 70% 70%, rgba(166, 123, 255, 0.06), transparent 70%),
    var(--bg);
  color: var(--ink);
  font: 400 14px/1.5 var(--mono);
  letter-spacing: 0.01em;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; color: inherit; }
pre { margin: 0; font-family: var(--mono); }

/* ---- header ---- */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: max(12px, env(safe-area-inset-top)) 16px 8px;
}
.brand { display: flex; align-items: baseline; gap: 10px; font-weight: 500; color: var(--ink); white-space: nowrap; }
.brand-mark { color: var(--cyan); text-shadow: 0 0 10px rgba(79, 243, 255, 0.6); }
.top-right { display: flex; gap: 6px; align-items: center; min-width: 0; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(8, 16, 32, 0.6);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
span.pill { cursor: default; }
button.pill:hover { color: var(--ink); border-color: rgba(140, 200, 255, 0.35); }
button.pill:disabled { opacity: 0.4; cursor: default; }
.pill[aria-pressed="true"] { color: var(--amber); border-color: rgba(255, 207, 90, 0.5); box-shadow: 0 0 12px rgba(255, 207, 90, 0.2) inset; }
#pearls b { color: var(--ink); font-weight: 500; }
#pearls.bump { animation: bump 0.5s ease; }
@keyframes bump { 40% { color: var(--amber); border-color: var(--amber); transform: scale(1.06); } }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 8px var(--mint); }
body.offline .dot { background: var(--faint); box-shadow: none; }

/* ---- the cube ---- */
.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 8px 16px 0;
}
.cube {
  --w: min(calc(100vw - 32px), 1100px);
  position: relative;
  width: var(--w);
  height: min(calc(100dvh - 210px), max(320px, calc(var(--w) * 0.58)));
  border: 1px solid rgba(150, 200, 255, 0.2);
  border-radius: 3px;
  background: #030a1a;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.02) inset,
    0 0 80px rgba(40, 120, 255, 0.12),
    0 30px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.cube canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
/* glass sheen + bright top edge */
.cube::before, .cube::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.cube::before {
  background: linear-gradient(112deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.015) 22%, transparent 23%, transparent 74%, rgba(255, 255, 255, 0.025) 75%, transparent 90%);
}
.cube::after {
  border-top: 1px solid rgba(200, 230, 255, 0.35);
  box-shadow: inset 0 0 60px rgba(60, 140, 255, 0.08);
}

.pedestal {
  position: relative;
  width: calc(var(--pw, min(calc(100vw - 32px), 1100px)) + 24px);
  max-width: calc(100vw - 16px);
  height: 46px;
  border-top: 1px solid rgba(120, 220, 255, 0.45);
  background: linear-gradient(#0a1020, #04060c 70%);
  box-shadow: 0 -10px 40px rgba(80, 200, 255, 0.10), 0 20px 40px rgba(0, 0, 0, 0.6);
  border-radius: 0 0 6px 6px;
  overflow: hidden;
}
.pedestal canvas {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 0;
  width: calc(100% - 24px);
  height: 100%;
  transform: scaleY(-1);
  opacity: 0.3;
  filter: blur(1px);
  -webkit-mask-image: linear-gradient(to top, #000, transparent 85%);
  mask-image: linear-gradient(to top, #000, transparent 85%);
}

.hint {
  position: absolute;
  left: 50%;
  top: 14%;
  transform: translateX(-50%);
  padding: 6px 12px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  width: max-content;
  max-width: 90%;
  text-align: center;
  pointer-events: none;
  animation: breathe 3.2s ease-in-out infinite;
  transition: opacity 1s;
}
.hint.out { opacity: 0; animation: none; }
@keyframes breathe { 50% { opacity: 0.45; } }

.card {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: flex;
  gap: 14px;
  align-items: center;
  max-width: calc(100% - 24px);
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--glass);
  pointer-events: none;
  animation: rise 0.25s ease;
}
.card[hidden] { display: none; }
.card .art { font-size: 12px; }
.card-name { font-weight: 500; display: flex; gap: 8px; align-items: center; }
.card-meta { color: var(--muted); font-size: 12px; }
.card-stats { color: var(--pink); font-size: 12px; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

.art { line-height: 1.05; white-space: pre; text-shadow: 0 0 6px currentColor; }
.art span { text-shadow: 0 0 6px currentColor, 0 0 14px currentColor; }
.art.shine span { animation: hue 3s linear infinite; }
@keyframes hue { to { filter: hue-rotate(360deg); } }
.tag {
  display: inline-block;
  padding: 1px 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 400;
  opacity: 0.9;
}

/* ---- dock ---- */
.dock {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 14px 16px max(16px, env(safe-area-inset-bottom));
}
.btn {
  position: relative;
  height: 40px;
  padding: 0 18px;
  border: 1px solid rgba(140, 200, 255, 0.25);
  border-radius: 10px;
  background: rgba(8, 18, 36, 0.7);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.1s;
}
.btn:hover { border-color: rgba(140, 220, 255, 0.5); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn.primary {
  border-color: rgba(79, 243, 255, 0.6);
  color: #e8fdff;
  box-shadow: 0 0 18px rgba(79, 243, 255, 0.18), inset 0 0 14px rgba(79, 243, 255, 0.10);
  text-shadow: 0 0 8px rgba(79, 243, 255, 0.7);
}
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); border-color: var(--line); }
.btn.small { height: 30px; padding: 0 12px; font-size: 12px; border-radius: 8px; }
.bonus { display: none; position: absolute; top: 6px; right: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.has-bonus .bonus { display: block; }
:focus-visible { outline: 1px solid var(--cyan); outline-offset: 2px; }

/* ---- the deep ---- */
.deep { position: fixed; inset: 0; z-index: 10; background: #030108; }
.deep[hidden] { display: none; }
.deep canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; user-select: none; -webkit-user-select: none; }
.deep-top {
  position: absolute;
  left: 0; right: 0; top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: max(12px, env(safe-area-inset-top)) 16px 0;
  pointer-events: none;
}
.deep-top > * { pointer-events: auto; }
.deep-title { color: var(--violet); text-shadow: 0 0 10px rgba(166, 123, 255, 0.6); }
.deep-right { display: flex; gap: 6px; }
.deep-hint {
  position: absolute;
  left: 0; right: 0;
  bottom: max(20px, env(safe-area-inset-bottom));
  margin: 0;
  padding: 0 16px;
  text-align: center;
  color: var(--muted);
  pointer-events: none;
}
@keyframes fade { from { opacity: 0; } }

.catch {
  --rar: var(--cyan);
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(calc(100vw - 32px), 440px);
  padding: 24px 20px 20px;
  border: 1px solid color-mix(in srgb, var(--rar) 40%, transparent);
  border-radius: 8px;
  background: rgba(4, 8, 20, 0.86);
  box-shadow: 0 0 60px color-mix(in srgb, var(--rar) 18%, transparent);
  text-align: center;
  animation: pop 0.35s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.catch[hidden] { display: none; }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -46%) scale(0.96); } }
.catch-rarity { color: var(--rar); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; }
.catch-art { display: flex; justify-content: center; margin: 18px 0 14px; }
.art.big { font-size: clamp(22px, 7vw, 34px); }
.catch-art .art span { animation: assemble 0.6s ease both; }
.catch-art .art.shine span { animation: assemble 0.6s ease both, hue 3s linear infinite; }
@keyframes assemble { from { opacity: 0; filter: blur(4px); } }
.catch-name { font-size: 20px; font-weight: 500; color: var(--rar); text-shadow: 0 0 12px color-mix(in srgb, var(--rar) 60%, transparent); }
.catch-meta { color: var(--muted); font-size: 12px; }
.catch-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 12px 0 4px; min-height: 4px; }
.catch-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }

/* ---- sheets ---- */
dialog.sheet {
  width: min(calc(100vw - 24px), 720px);
  max-height: min(86dvh, 900px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #050a16;
  color: var(--ink);
  box-shadow: 0 0 80px rgba(40, 120, 255, 0.15);
  overflow: auto;
}
dialog.sheet.narrow { width: min(calc(100vw - 24px), 440px); }
dialog::backdrop { background: rgba(1, 3, 8, 0.7); backdrop-filter: blur(2px); }
dialog[open] { animation: rise 0.25s ease; }
.sheet-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: #050a16;
  border-bottom: 1px solid var(--line);
}
.sheet-head h2 { margin: 0; font-size: 15px; font-weight: 500; }
.sheet-sub { margin: 12px 16px 0; color: var(--muted); font-size: 12px; }
.sheet-body { padding: 16px; }
.sheet-body p { margin: 0 0 12px; }
.muted { color: var(--muted); font-size: 12px; }
.err { color: #ff8a7a; font-size: 12px; min-height: 1em; margin: 6px 0 0 !important; }

.dex { margin: 12px 16px 4px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.dex-head { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; margin-bottom: 10px; }
.dex-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.dex-item { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; padding: 8px 4px; border-radius: 6px; background: rgba(255, 255, 255, 0.02); font-size: 11px; color: var(--muted); min-height: 76px; }
.dex-item .art { font-size: 9px; }
.dex-item.locked .art, .dex-item.locked .art span { text-shadow: none; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.swatch { width: 22px; height: 8px; border-radius: 4px; box-shadow: 0 0 8px rgba(255, 255, 255, 0.15); }
.swatch.locked { background: var(--faint) !important; opacity: 0.35; box-shadow: none; }

.bowl-list { list-style: none; margin: 0; padding: 8px 16px 16px; display: grid; gap: 8px; }
.bowl-list .empty { color: var(--muted); padding: 24px 0; text-align: center; }
.bowl-item {
  display: grid;
  grid-template-columns: minmax(90px, 140px) 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.015);
}
.bowl-item.in-tank { border-color: rgba(79, 243, 255, 0.35); }
.bowl-item .art { font-size: 12px; justify-self: center; }
.fish-name { background: none; border: 0; padding: 0; font-weight: 500; cursor: text; text-align: left; }
.fish-name:hover { text-decoration: underline dotted; }
.rename { width: 100%; max-width: 200px; padding: 2px 6px; background: #0a1428; border: 1px solid var(--line); border-radius: 4px; }
.bowl-actions { display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 700px) and (orientation: portrait) {
  .cube { height: min(calc(100dvh - 200px), calc(var(--w) * 1.5)); }
}
@media (max-width: 560px) {
  .top { padding-left: 12px; padding-right: 12px; }
  .online-label { display: none; }
  .bowl-item { grid-template-columns: 1fr; text-align: center; }
  .bowl-info { display: flex; flex-direction: column; align-items: center; }
  .bowl-actions { flex-direction: row; justify-content: center; }
  .brand span:last-child { display: none; }
}

.row-form { display: flex; gap: 8px; }
.col-form { display: flex; flex-direction: column; gap: 8px; }
.row-form input, .col-form input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  background: #0a1428;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.col-form input { flex: none; }
.divider { display: flex; align-items: center; gap: 10px; margin: 20px 0 12px; color: var(--muted); font-size: 12px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.phrase { margin: 4px 0 16px; padding: 12px; border: 1px solid rgba(255, 207, 90, 0.4); border-radius: 8px; }
.phrase-row { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.phrase code { color: var(--amber); font-size: 15px; word-break: break-all; text-shadow: 0 0 8px rgba(255, 207, 90, 0.5); }

/* ---- toasts ---- */
.toasts { position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%); z-index: 20; display: flex; flex-direction: column; gap: 6px; align-items: center; width: max-content; max-width: calc(100vw - 32px); pointer-events: none; }
.toast { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: rgba(6, 12, 26, 0.92); color: var(--ink); font-size: 12px; text-align: center; animation: rise 0.25s ease; transition: opacity 0.5s; }
.toast.out { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}

/* ---- optional names ---- */
input.catch-name {
  display: block;
  width: min(100%, 260px);
  margin: 0 auto 6px;
  padding: 4px 8px;
  border: 0;
  border-bottom: 1px dashed color-mix(in srgb, var(--rar) 45%, transparent);
  background: transparent;
  text-align: center;
  outline: none;
}
input.catch-name::placeholder { color: var(--faint); text-shadow: none; font-size: 15px; }
input.catch-name:focus { border-bottom-style: solid; }
.unnamed { color: var(--muted); font-style: italic; font-weight: 400; }
.fish-name.unnamed { opacity: 0.7; }
.link { background: none; border: 0; padding: 0; color: var(--muted); font-size: 12px; text-decoration: underline dotted; cursor: pointer; }
.link:hover { color: var(--ink); }
.link:disabled { text-decoration: none; cursor: default; }
.card { pointer-events: auto; }
.gift-form { margin-top: 8px; }
.gift-form input { height: 30px; }

/* ---- blooms ---- */
.bloom {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 12px;
  border: 1px solid rgba(255, 111, 216, 0.45);
  border-radius: 999px;
  background: rgba(20, 6, 26, 0.6);
  color: #ffb3ea;
  font-size: 12px;
  white-space: nowrap;
  text-shadow: 0 0 8px rgba(255, 111, 216, 0.6);
  pointer-events: none;
  animation: breathe 3.2s ease-in-out infinite;
}
.bloom[hidden] { display: none; }
.deep-bloom { align-self: center; color: var(--muted); font-size: 12px; margin-right: 4px; }
.deep-bloom.on { color: #ffb3ea; text-shadow: 0 0 8px rgba(255, 111, 216, 0.6); }

/* ---- decorate ---- */
.decor-mine { list-style: none; margin: 10px 16px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.mine-decor { display: flex; align-items: center; gap: 4px; padding: 0 0 0 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; }
.decor-list { list-style: none; margin: 0; padding: 12px 16px 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.decor-item { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; padding: 12px 8px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, 0.015); }
.decor-item .art { font-size: 11px; }
.decor-name { color: var(--muted); font-size: 12px; }
.place-bar {
  position: fixed;
  left: 50%;
  bottom: 100px;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 6px 14px;
  border: 1px solid rgba(79, 243, 255, 0.45);
  border-radius: 999px;
  background: rgba(4, 10, 22, 0.92);
  font-size: 12px;
  white-space: nowrap;
}
.place-bar[hidden] { display: none; }
.place-bar b { color: var(--cyan); font-weight: 500; }

@media (max-width: 560px) {
  .deep-bloom { display: none; }
}

.dex summary { cursor: pointer; list-style: none; margin-bottom: 0; }
.dex summary::-webkit-details-marker { display: none; }
.dex summary .dex-title::before { content: "▸ "; }
.dex details[open] summary { margin-bottom: 10px; }
.dex details[open] summary .dex-title::before { content: "▾ "; }
@media (max-width: 560px) {
  .dex-grid { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; }
  .dex-item { min-height: 58px; padding: 6px 2px; }
  .dex-item .art { font-size: 7px; }
}

/* ---- round 3: tab bar, catch card, reel-in ---- */
/* pills = status chips, tags, small toggles · rounded rects = actions */
.dock {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  width: min(calc(100vw - 32px), 520px);
  margin: 12px auto max(14px, env(safe-area-inset-bottom));
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(6, 12, 26, 0.72);
}
.tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 52px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.tab:hover { color: var(--ink); background: rgba(140, 200, 255, 0.06); }
.tab:active { transform: scale(0.97); }
.tab-icon { font-size: 13px; color: var(--ink); opacity: 0.8; white-space: pre; }
.tab.primary { color: #e8fdff; background: rgba(79, 243, 255, 0.08); box-shadow: inset 0 0 0 1px rgba(79, 243, 255, 0.35), 0 0 18px rgba(79, 243, 255, 0.12); }
.tab.primary .tab-icon { color: var(--cyan); opacity: 1; text-shadow: 0 0 8px rgba(79, 243, 255, 0.8); }
.tab .bonus { top: 8px; right: 14px; }
@media (max-width: 560px) {
  .dock { width: calc(100vw - 24px); }
}

.catch-actions { align-items: center; }
.catch-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
.catch-row .btn { padding: 0 10px; }
.catch.arming .catch-actions { opacity: 0.35; pointer-events: none; }
.catch .catch-actions { transition: opacity 0.35s; }

.deep-right [hidden] { display: none; }

/* ---- weigh-in & records ---- */
.catch-weight { margin-top: 10px; font-size: 13px; color: var(--muted); }
.catch-weight b { font-size: 18px; font-weight: 500; color: var(--ink); letter-spacing: 0.02em; }
.catch-skill { color: #ffcf5a; }
.catch-best { color: var(--faint); font-size: 11px; margin-top: 4px; min-height: 1em; }
.dex-best { display: block; color: var(--muted); font-size: 10px; }
.rec { color: #ffcf5a; }

/* toasts that carry a single action */
.toast.has-action { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding-right: 6px; }
.toast-act {
  border: 1px solid color-mix(in srgb, #ff9ab8 50%, transparent); background: transparent; color: #ff9ab8;
  font: inherit; font-size: 12px; border-radius: 999px; padding: 3px 10px; cursor: pointer;
}
.toast-act:hover { background: color-mix(in srgb, #ff9ab8 12%, transparent); }

/* ---- round 4: pearls, chips & stats instead of dotted lines ---- */
/* the currency: a little glowing pearl that always follows the amount */
.amt { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pearl {
  display: inline-block; width: 0.78em; height: 0.78em; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 34% 30%, #ffffff 0 12%, #f3ecff 22%, #d7d2f0 48%, #a69fca 78%, #7d77a6 100%);
  box-shadow: 0 0 6px rgba(235, 225, 255, 0.55);
}
#pearls { gap: 5px; }
#pearls .pearl { width: 0.95em; height: 0.95em; }
.pearl-word { color: var(--muted); }
@media (max-width: 420px) { .pearl-word { display: none; } }
.toast .amt { color: var(--amber); margin-left: 8px; }
.toast { display: inline-flex; align-items: center; justify-content: center; }

/* chips: short labelled facts (kind, color, temperament) */
.chips { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 8px;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, 0.025);
  color: var(--muted); font-size: 11px; white-space: nowrap;
}
.chip.kind { color: var(--c); border-color: color-mix(in srgb, var(--c) 40%, transparent); }
.rar-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; }
.chip .sw { width: 12px; height: 6px; border-radius: 3px; }
.chip.shine { color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.chip.rec { color: var(--amber); border-color: rgba(255, 207, 90, 0.45); }
.catch-meta .chips { justify-content: center; margin-top: 10px; }

/* stats: value on top, what it means underneath */
.stats { display: flex; gap: 16px; }
.stat { display: flex; flex-direction: column; min-width: 0; }
.stat b { color: var(--ink); font-weight: 500; font-size: 13px; font-variant-numeric: tabular-nums; }
.stat span { color: var(--faint); font-size: 10px; letter-spacing: 0.04em; }

/* tank fish card */
.card-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.card-name { font-size: 15px; }
.card-foot { display: flex; gap: 12px; justify-content: space-between; align-items: baseline; color: var(--muted); font-size: 11px; }

/* catch card */
.catch-weight { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-top: 12px; }
.catch-weight b { font-size: 22px; }
.catch-skill { color: var(--amber); font-size: 11px; }
.catch-best { display: flex; justify-content: center; gap: 24px; margin-top: 10px; text-align: center; }
.catch-best[hidden] { display: none; }
.catch-best .stat { align-items: center; }
.catch-best .stat b { color: var(--muted); }
.tag { display: inline-flex; align-items: center; gap: 4px; }
.tag .amt { color: inherit; }

/* hint and bloom banner: separate items, no dots */
.hint { display: flex; gap: 14px; }
.hint > span { display: inline-flex; align-items: center; gap: 6px; }
kbd {
  font: inherit; font-size: 10px; color: var(--ink); padding: 1px 6px;
  border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; background: rgba(255, 255, 255, 0.04);
}
@media (max-width: 560px) {
  .hint { flex-direction: column; gap: 4px; align-items: center; white-space: normal; }
}
.bloom { display: flex; gap: 8px; align-items: center; }
.bloom b { font-weight: 500; }
.bloom span { color: #e8c6e0; text-shadow: none; }
.bloom .bloom-left { padding: 0 6px; border-radius: 999px; background: rgba(255, 111, 216, 0.14); color: #ffb3ea; }

/* bowl */
.sheet-stats { margin: 14px 16px 0; justify-content: space-between; }
.sheet-stats .stat b { font-size: 16px; }
.dex-head { align-items: center; gap: 16px; flex-wrap: wrap; }
.dex-title { flex: 1; }
.prog { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; }
.prog-label { color: var(--faint); }
.prog-bar { width: 64px; height: 4px; border-radius: 2px; background: rgba(140, 190, 255, 0.12); overflow: hidden; }
.prog-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--violet)); box-shadow: 0 0 6px var(--cyan); }
.prog-n { color: var(--ink); font-variant-numeric: tabular-nums; }
.bowl-info { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; min-width: 0; }
.bowl-weight { display: flex; gap: 8px; align-items: center; color: var(--ink); font-size: 13px; font-variant-numeric: tabular-nums; }
.bowl-live { color: #8fe9f5; font-size: 11px; }
@media (max-width: 560px) {
  .bowl-info { align-items: center; }
  .bowl-info .chips { justify-content: center; }
  .sheet-stats .stat { align-items: center; text-align: center; }
}

/* decorate: balance first, then your spots, then the shop */
.balance { display: flex; gap: 16px; align-items: center; margin: 14px 16px 0; padding: 12px 14px; border: 1px solid rgba(235, 225, 255, 0.18); border-radius: 10px; background: rgba(235, 225, 255, 0.03); }
.balance-amt { display: flex; flex-direction: column; gap: 2px; flex: none; }
.balance-label { color: var(--faint); font-size: 10px; letter-spacing: 0.04em; }
.balance-amt .amt { font-size: 22px; color: var(--ink); }
.balance-how { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.sheet-h { display: flex; gap: 10px; align-items: baseline; margin: 18px 16px 8px; font-size: 12px; font-weight: 500; color: var(--ink); }
.sheet-h span { color: var(--faint); font-weight: 400; font-size: 11px; }
.decor-mine { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin: 0 16px; gap: 8px; }
.slot { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; }
.slot .art { font-size: 8px; }
.slot span { flex: 1; }
.slot.empty { justify-content: center; border-style: dashed; color: var(--faint); min-height: 46px; }
.decor-list { padding-top: 0; }
.decor-item .btn .amt { font-size: 12px; }
.decor-item.pricey .art { opacity: 0.55; }
.decor-why { min-height: 1.4em; color: var(--faint); font-size: 10px; }
@media (max-width: 560px) { .balance { flex-direction: column; align-items: flex-start; gap: 6px; } }

/* bottom nav: four equal tabs, each with its own icon color; none looks selected */
.tab .tab-icon { opacity: 1; }
#go-fish .tab-icon { color: var(--cyan); text-shadow: 0 0 8px rgba(79, 243, 255, 0.6); }
#open-bowl .tab-icon { color: var(--mint); text-shadow: 0 0 8px rgba(93, 255, 176, 0.5); }
#open-decor .tab-icon { color: var(--violet); text-shadow: 0 0 8px rgba(166, 123, 255, 0.6); }
#open-net .tab-icon { color: var(--amber); text-shadow: 0 0 8px rgba(255, 207, 90, 0.5); }
.net-n {
  position: absolute; top: 5px; right: calc(50% - 26px); min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: var(--amber); color: #1a1204; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
}
.net-n[hidden] { display: none; }
.deep-right .btn.small { height: 30px; }
@media (max-width: 560px) {
  .dex-head { gap: 8px 16px; }
  .dex-title { flex-basis: 100%; }
  .prog { flex: 1 1 120px; }
  .prog-bar { flex: 1; }
}

/* decorate: things you own (in the tank or in storage) */
.decor-next { margin: -4px 16px 8px; color: var(--muted); font-size: 11px; }
.decor-next:empty { display: none; }
.decor-mine { display: grid; grid-template-columns: 1fr; gap: 6px; }
.owned { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.owned .art { font-size: 8px; justify-self: center; }
.owned.stored { border-style: dashed; }
.owned.stored .art { opacity: 0.6; }
.owned-info { display: flex; flex-direction: column; font-size: 12px; }
.owned-where { color: var(--faint); font-size: 10px; }
.owned-actions { display: flex; gap: 6px; }
.owned-empty { color: var(--muted); font-size: 11px; padding: 10px 2px; }
.card-acts { display: inline-flex; gap: 12px; }

/* ---- phase B: growing up & eggs ---- */
.chip.life.s0 { color: #9fd8ff; }
.chip.life.s1 { color: var(--mint); border-color: rgba(93, 255, 176, 0.35); }
.chip.life.s2 { color: var(--amber); border-color: rgba(255, 207, 90, 0.45); box-shadow: 0 0 8px rgba(255, 207, 90, 0.2); }
.grow { display: flex; align-items: center; gap: 8px; color: var(--faint); font-size: 10px; }
.grow .prog-bar { width: 72px; }
.grow .prog-bar i { background: linear-gradient(90deg, var(--mint), var(--amber)); box-shadow: 0 0 6px var(--mint); }
.grow.done { color: var(--amber); }
.bowl-hint { color: var(--faint); font-size: 10px; }

.egg-list { list-style: none; margin: 12px 16px 0; padding: 0; display: grid; gap: 6px; }
.egg-list[hidden] { display: none; }
.egg { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 12px; padding: 8px 12px; border: 1px dashed rgba(255, 207, 90, 0.3); border-radius: 8px; }
.egg .art { font-size: 11px; justify-self: center; }
.egg.ready { border-style: solid; border-color: rgba(255, 207, 90, 0.6); box-shadow: 0 0 16px rgba(255, 207, 90, 0.12); }
.egg.ready .art { animation: wobble 1.2s ease-in-out infinite; }
@keyframes wobble { 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }
.egg-info { display: flex; flex-direction: column; font-size: 12px; min-width: 0; }
.egg-from { color: var(--faint); font-size: 10px; }
.egg-time { align-items: flex-end; }

.hatch .sheet-body { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.hatch-art { margin: 8px 0; }
.hatch-from { margin: 0 !important; color: var(--muted); font-size: 12px; }
.hatch-chips .chips { justify-content: center; }
.hatch .catch-row { margin-top: 8px; }
@media (prefers-reduced-motion: reduce) { .egg.ready .art { animation: none; } }

/* ---- phase C: tide log, shells, titles ---- */
#open-tide .tab-icon { color: #ffb38a; text-shadow: 0 0 8px rgba(255, 179, 138, 0.55); }
@media (max-width: 420px) { .tab { font-size: 11px; } .tab .bonus { right: 8px; } }
.shell {
  display: inline-block; width: 0.9em; height: 0.78em; flex: none;
  border-radius: 50% 50% 22% 22% / 70% 70% 30% 30%;
  background: repeating-conic-gradient(from -90deg at 50% 100%, #ffc9a3 0 9deg, #ff9a6e 9deg 18deg);
  box-shadow: 0 0 6px rgba(255, 160, 120, 0.45);
}
.amt.shells { color: #ffc9a3; }
.toast .amt.shells { color: #ffc9a3; margin-left: 6px; }
.title { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; border: 1px solid rgba(255, 207, 90, 0.35); color: var(--amber); font-size: 10px; font-weight: 400; }

/* ---- round 7: easy to scan ---- */
/* a thin bar with its count: the shared way to show "how far along" */
.bar { display: flex; align-items: center; gap: 8px; width: 100%; }
.bar .prog-bar { flex: 1; width: auto; }
.bar-n { color: var(--faint); font-size: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; }

.sheet-head h2 .tide-reset { margin-left: 10px; color: var(--faint); font-size: 11px; font-weight: 400; }
.tide-list, .mile-list, .shell-track { list-style: none; margin: 0 16px; padding: 0; display: grid; gap: 8px; }
.task, .mile {
  display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px;
  padding: 12px 14px 12px 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(140, 190, 255, 0.025);
}
.task-ico { justify-self: center; color: var(--cyan); font-size: 13px; white-space: pre; text-shadow: 0 0 8px rgba(79, 243, 255, 0.5); }
.task-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.task-text { color: var(--ink); font-size: 13px; line-height: 1.35; }
.task-reward { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-size: 12px; }
.task-reward .amt:not(.shells) { color: var(--amber); }
.task.done { background: transparent; border-color: rgba(93, 255, 176, 0.18); }
.task.done .task-ico { color: var(--mint); font-size: 16px; text-shadow: 0 0 8px rgba(93, 255, 176, 0.6); }
.task.done .task-text { color: var(--muted); }
.task-got { color: var(--mint); font-size: 11px; }
.tide-bonus { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin: 10px 16px 0; color: var(--muted); font-size: 12px; }
.tide-bonus.done { color: var(--mint); }
.pips { display: inline-flex; gap: 4px; }
.pips i, .spot-pips i { width: 8px; height: 8px; border-radius: 50%; border: 1px solid rgba(140, 190, 255, 0.35); }
.pips i.on { background: var(--mint); border-color: var(--mint); box-shadow: 0 0 6px var(--mint); }
#tide .sheet-h { margin-top: 22px; }
#tide .sheet-h:first-of-type { margin-top: 14px; }

.shell-next { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 16px; margin: 0 16px 10px; padding: 12px 14px; border: 1px solid rgba(255, 179, 138, 0.28); border-radius: 10px; background: rgba(255, 179, 138, 0.04); }
.shell-next > b:only-child { grid-column: 1 / -1; color: var(--muted); font-weight: 400; font-size: 12px; }
.shell-next-art { display: flex; justify-content: center; }
.shell-next-art .art { font-size: 10px; opacity: 0.55; filter: saturate(0.6); margin: 0; }
.shell-next-info { display: flex; flex-direction: column; gap: 8px; }
.shell-next-info b { font-weight: 500; font-size: 14px; color: var(--ink); }
.shell-next .prog-bar i { background: linear-gradient(90deg, #ffc9a3, #ff9a6e); box-shadow: 0 0 6px #ff9a6e; }
.shell-track { grid-template-columns: repeat(4, 1fr); }
.shell-step { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 4px; color: var(--faint); font-size: 10px; }
.shell-art { min-height: 44px; display: flex; align-items: flex-end; justify-content: center; }
.shell-step .art { font-size: 6px; margin: 0; }
.shell-step.got small { color: var(--mint); }
.mile .task-ico { color: var(--amber); text-shadow: 0 0 8px rgba(255, 207, 90, 0.45); }
#tide .mile-list { margin-bottom: 20px; }

/* the deep: what to do now, and the way out, sit together at the bottom */
.deep-foot {
  position: absolute; left: 0; right: 0; bottom: max(18px, env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none;
}
.deep-foot > * { pointer-events: auto; }
.deep-foot .deep-hint { position: static; pointer-events: none; transition: color 0.2s, transform 0.2s; }
.deep-hint.loud { color: var(--amber); font-size: 18px; font-weight: 600; text-shadow: 0 0 12px rgba(255, 207, 90, 0.7); transform: scale(1.05); }
.deep-cancel[hidden] { display: none; }
.deep-cancel { min-width: 128px; }

/* catch card: rarity, then what it is, then how big; then three clear choices */
.rar-badge { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 999px; color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 50%, transparent); background: color-mix(in srgb, var(--c) 10%, transparent); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; text-shadow: 0 0 10px color-mix(in srgb, var(--c) 70%, transparent); }
.rar-badge .stars { letter-spacing: 0.05em; }
#catch .catch-art { margin: 14px 0 6px; }
.catch-kind { margin: 0; font-size: 26px; font-weight: 600; color: var(--rar); text-shadow: 0 0 14px color-mix(in srgb, var(--rar) 55%, transparent); }
#catch .catch-meta .chips { margin-top: 8px; }
#catch .catch-weight { flex-direction: row; justify-content: center; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-top: 12px; }
#catch .catch-weight b { font-size: 20px; }
#catch .catch-best { display: inline; margin: 0; font-size: 11px; color: var(--faint); min-height: 0; }
#catch .catch-tags[hidden] { display: none; }
.catch-name-row { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 14px auto 0; width: min(100%, 240px); color: var(--faint); border-bottom: 1px dashed var(--line); }
.catch-name-row:focus-within { border-bottom-color: color-mix(in srgb, var(--rar) 60%, transparent); color: var(--rar); }
#catch input.catch-name { width: 100%; margin: 0; padding: 6px 4px; border: 0; font-size: 14px; font-weight: 400; color: var(--ink); text-shadow: none; text-align: left; }
#catch input.catch-name::placeholder { font-size: 13px; }
#catch .catch-actions { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; margin-top: 18px; }
.choice {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 84px; padding: 10px 6px;
  border: 1px solid var(--line); border-radius: 12px; background: rgba(140, 190, 255, 0.04); color: var(--ink); font: inherit; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.choice:hover { background: rgba(140, 190, 255, 0.09); }
.choice:active { transform: scale(0.97); }
.choice b { font-size: 13px; font-weight: 500; }
.choice small { min-height: 1.2em; color: var(--faint); font-size: 11px; }
.choice small .amt { color: var(--amber); }
.choice-ico { font-size: 15px; white-space: pre; color: var(--muted); }
.choice.primary { border-color: color-mix(in srgb, var(--rar) 55%, transparent); background: color-mix(in srgb, var(--rar) 10%, transparent); box-shadow: 0 0 18px color-mix(in srgb, var(--rar) 18%, transparent); }
.choice.primary .choice-ico { color: var(--rar); text-shadow: 0 0 8px color-mix(in srgb, var(--rar) 70%, transparent); }
.choice[data-act="keep"] .choice-ico { color: var(--mint); }
.choice[data-act="letgo"] .choice-ico { color: var(--amber); }
.choice.sure { border-color: rgba(255, 207, 90, 0.6); background: rgba(255, 207, 90, 0.08); }
.choice:disabled { opacity: 0.45; cursor: default; }

/* bowl: the fish is the headline; a pencil renames it */
.fish-name { display: inline-flex; align-items: baseline; gap: 8px; font-size: 15px; }
.fish-name .pencil { color: var(--faint); font-size: 12px; opacity: 0.6; }
.fish-name:hover .pencil { opacity: 1; }
.fish-name:hover { text-decoration: none; }
.chip.live { color: var(--cyan); border-color: rgba(79, 243, 255, 0.4); }

/* decorate */
.balance { justify-content: space-between; }
.spots { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.spot-pips { display: inline-flex; gap: 5px; }
.spot-pips i { width: 10px; height: 10px; border-radius: 3px; }
.spot-pips i.on { background: var(--violet); border-color: var(--violet); box-shadow: 0 0 6px var(--violet); }
@media (max-width: 560px) { .balance { flex-direction: row; align-items: center; } }
.decor-item .decor-why { min-height: 0; }
.choice-ico, .task-ico, .tab-icon { font-variant-ligatures: none; font-feature-settings: "calt" 0, "liga" 0; }
.deep-cancel { border: 1px solid var(--line); background: rgba(4, 10, 22, 0.6); }
.shell-step:not(.got) .art { opacity: 0.9; filter: brightness(1.4); }
/* hatching uses the catch card's layout */
#hatch .sheet-body { text-align: center; }
#hatch .hatch-from { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
#hatch .catch-actions { display: grid; grid-template-columns: 1.3fr 1fr; gap: 8px; margin-top: 18px; width: 100%; align-items: stretch; }
#hatch input.catch-name { width: 100%; margin: 0; padding: 6px 4px; border: 0; font-size: 14px; font-weight: 400; color: var(--ink); text-shadow: none; text-align: left; }

/* ---- round 8: tips, tackle, diving and surfacing ---- */
/* a tip sits right next to what you tapped, with a little pointer */
.tip {
  position: absolute; z-index: 60; max-width: min(280px, calc(100vw - 24px)); padding: 8px 12px;
  border: 1px solid rgba(140, 200, 255, 0.35); border-radius: 10px; background: rgba(6, 14, 30, 0.97);
  color: var(--ink); font-size: 12px; line-height: 1.45; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  animation: tip-in 0.16s ease-out; pointer-events: auto;
}
.tip::after {
  content: ''; position: absolute; left: calc(var(--arrow, 50%) - 6px); width: 10px; height: 10px;
  background: inherit; border: inherit; border-width: 0 1px 1px 0; transform: rotate(45deg);
}
.tip.above::after { bottom: -6px; }
.tip.below::after { top: -6px; transform: rotate(-135deg); }
.tip.out { opacity: 0; transition: opacity 0.18s; }
@keyframes tip-in { from { opacity: 0; transform: translateY(4px); } }
[aria-disabled="true"] { opacity: 0.5; }

/* the deep: back up to the tank sits top left, like any back button */
.deep-left { display: flex; align-items: center; gap: 12px; }
.btn.back { gap: 6px; padding-left: 10px; }
.btn.back .up { color: var(--cyan); text-shadow: 0 0 8px rgba(79, 243, 255, 0.7); transition: transform 0.2s; }
.btn.back:hover .up { transform: translateY(-2px); }
.tackle-btn { gap: 8px; }
.tackle-btn[hidden] { display: none; }
.tackle-ico, .gear-ico { color: var(--amber); font-variant-ligatures: none; white-space: pre; }
.tackle-n { color: var(--faint); font-variant-numeric: tabular-nums; }

/* diving: the tank lifts away and the deep rises from below; surfacing reverses it */
.deep.rise-in { animation: deep-rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.deep.sink-out { animation: deep-sink 0.5s cubic-bezier(0.6, 0, 0.8, 0.4) forwards; }
@keyframes deep-rise { from { transform: translateY(100%); } }
@keyframes deep-sink { to { transform: translateY(100%); } }
body.diving .stage, body.diving .top, body.diving .dock { animation: tank-lift 0.6s cubic-bezier(0.4, 0, 0.6, 1) forwards; }
body.surfacing .stage, body.surfacing .top, body.surfacing .dock { animation: tank-drop 0.55s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes tank-lift { to { transform: translateY(-35%); opacity: 0.2; } }
@keyframes tank-drop { from { transform: translateY(-35%); opacity: 0.2; } }

/* sheets rise out of the tab that opened it; that tab stays lit */
dialog.sheet[open] { animation: sheet-rise 0.28s cubic-bezier(0.2, 0.9, 0.3, 1); transform-origin: var(--from-x, 50%) 110%; }
dialog.sheet.closing { animation: sheet-fall 0.18s ease-in forwards; }
@keyframes sheet-rise { from { opacity: 0; transform: translateY(28px) scale(0.94); } }
@keyframes sheet-fall { to { opacity: 0; transform: translateY(24px) scale(0.96); } }
.tab[aria-current] { color: var(--ink); background: rgba(140, 200, 255, 0.08); box-shadow: inset 0 -2px 0 var(--cyan); }

/* tackle shop */
.bait-list, .gear-list { list-style: none; margin: 0 16px; padding: 0; display: grid; gap: 8px; }
#tackle .gear-list { margin-bottom: 20px; }
.bait { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.bait.on { border-color: rgba(255, 207, 90, 0.55); box-shadow: 0 0 14px rgba(255, 207, 90, 0.12); }
.bait-pick { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 12px; width: 100%; padding: 12px 14px 12px 10px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.bait-pick:hover { background: rgba(140, 190, 255, 0.05); }
.bait-pick .gear-ico, .gear .gear-ico { justify-self: center; font-size: 13px; }
.bait-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.bait-text b { font-weight: 500; font-size: 13px; }
.bait-text small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.bait-n { color: var(--faint); font-size: 11px; white-space: nowrap; }
.bait.on .bait-n { color: var(--amber); }
.bait-buys { display: flex; justify-content: flex-end; gap: 6px; padding: 0 12px 10px; }
.gear { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 12px; padding: 12px 14px 12px 10px; border: 1px solid var(--line); border-radius: 10px; }
.gear.owned { border-color: rgba(93, 255, 176, 0.25); }
.gear.owned .bait-n { color: var(--mint); }
.sheet-head h2 .tackle-amt { margin-left: 10px; font-size: 13px; font-weight: 400; }

/* ---- phase D: the tank together ---- */
/* the weekly goal: a small live meter at the top of the tank */
.goal {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 3;
  display: flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px; max-width: calc(100% - 24px);
  border: 1px solid rgba(79, 243, 255, 0.35); border-radius: 999px; background: rgba(4, 12, 26, 0.88);
  color: var(--ink); backdrop-filter: blur(4px); font: inherit; font-size: 11px; white-space: nowrap; cursor: pointer;
}
.goal[hidden] { display: none; }
.bloom:not([hidden]) ~ .goal { top: 44px; }
.goal .goal-ico { color: var(--cyan); font-variant-ligatures: none; text-shadow: 0 0 8px rgba(79, 243, 255, 0.6); }
.goal .goal-bar { width: 64px; height: 4px; border-radius: 2px; background: rgba(140, 190, 255, 0.15); overflow: hidden; }
.goal .goal-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), #9a8cff); box-shadow: 0 0 6px var(--cyan); transition: width 0.4s ease-out; }
.goal .goal-n { color: var(--muted); font-variant-numeric: tabular-nums; }
.goal.bump .goal-bar i { animation: goal-bump 0.5s ease-out; }
@keyframes goal-bump { 30% { filter: brightness(1.8); } }
.goal.done { border-color: rgba(93, 255, 176, 0.35); }
.goal.done .goal-ico { color: var(--mint); }
.goal.legend { border-color: rgba(255, 111, 216, 0.5); color: #ffb3ea; animation: breathe 3.2s ease-in-out infinite; }
.goal.legend .goal-ico { color: #ff6fd8; text-shadow: 0 0 8px rgba(255, 111, 216, 0.8); }
@media (max-width: 420px) { .goal .goal-bar { width: 40px; } }

/* this week, at the top of the tide log */
.week-goal { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px; margin: 0 16px; padding: 12px 14px 12px 10px;
  border: 1px solid rgba(79, 243, 255, 0.28); border-radius: 10px; background: rgba(79, 243, 255, 0.04); }
.week-goal .prog-bar i { background: linear-gradient(90deg, var(--cyan), #9a8cff); }
.week-goal.done { border-color: rgba(93, 255, 176, 0.25); }
.week-goal.done .task-ico { color: var(--mint); }
.week-mine { color: var(--faint); font-size: 11px; }
.week-legend { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 14px; margin: 8px 16px 0; padding: 10px 14px;
  border: 1px dashed rgba(255, 111, 216, 0.25); border-radius: 10px; }
.week-legend.on { border-style: solid; border-color: rgba(255, 111, 216, 0.5); background: rgba(255, 111, 216, 0.05); }
.week-legend.caught { border-color: rgba(93, 255, 176, 0.25); background: transparent; }
.week-legend-art { display: flex; justify-content: center; overflow: hidden; }
.week-legend-art .art { font-size: 9px; margin: 0; }
.week-legend b { font-weight: 500; font-size: 13px; color: var(--ink); }
.week-legend.on b { color: #ffb3ea; }
.week-legend small { color: var(--muted); font-size: 11px; line-height: 1.45; }
#tide .week .sheet-h { margin-top: 14px; }

/* who's here */
#online { cursor: pointer; }
.who b { display: block; margin-bottom: 6px; font-weight: 500; }
.who ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.who li { display: flex; align-items: center; gap: 8px; }
.who li.you { color: var(--muted); }
.who .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 6px var(--mint); }
.who small { display: block; margin-top: 6px; color: var(--faint); }

/* while you were away */
.sheet-head h2 .away-when { margin-left: 10px; color: var(--faint); font-size: 11px; font-weight: 400; }
.away-list { list-style: none; margin: 14px 16px 0; padding: 0; display: grid; gap: 8px; }
.away-list .task-ico { font-variant-ligatures: none; }
.away-goal { border-color: rgba(255, 111, 216, 0.4); }
.away-goal .task-ico { color: #ff6fd8; text-shadow: 0 0 8px rgba(255, 111, 216, 0.7); }
.away-thanks .task-ico, .away-care .task-ico { color: #ff9ab8; }
.away-foot { display: flex; justify-content: center; margin: 16px; }

/* ---- phase E: first session and feel ---- */
/* the coach: a tip that waits for you, pointing at the one thing to do next */
.tip.coach { border-color: rgba(255, 207, 90, 0.6); color: #ffe7a8; font-weight: 500; box-shadow: 0 0 24px rgba(255, 207, 90, 0.18), 0 8px 24px rgba(0, 0, 0, 0.45); animation: tip-in 0.2s ease-out, coach-bob 1.6s ease-in-out 0.2s infinite; pointer-events: none; z-index: 55; }
@keyframes coach-bob { 50% { translate: 0 -3px; } }
.coach-target { outline: 2px solid rgba(255, 207, 90, 0.7); outline-offset: 3px; animation: coach-ring 1.6s ease-out infinite; }
#card.coach-target { outline-offset: 0; }
@keyframes coach-ring { 0% { box-shadow: 0 0 0 0 rgba(255, 207, 90, 0.45); } 70%, 100% { box-shadow: 0 0 0 14px rgba(255, 207, 90, 0); } }
.deep-hint.coach-target { outline: none; animation: none; color: var(--amber); }

/* catch peak: rays behind rare fish, a gold sweep behind mythic ones */
.catch-art { position: relative; }
.catch-art .art { position: relative; z-index: 1; animation: art-pop 0.55s cubic-bezier(0.2, 1.5, 0.4, 1) both; }
@keyframes art-pop { from { transform: scale(0.4); } }
.catch[data-rar="2"] .catch-art::before, .catch[data-rar="3"] .catch-art::before {
  content: ''; position: absolute; left: 50%; top: 50%; width: 240px; height: 240px; margin: -120px 0 0 -120px; border-radius: 50%; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--rar) 30%, transparent) 0deg 8deg, transparent 8deg 30deg);
  mask: radial-gradient(circle, #000 15%, transparent 70%);
  animation: rays-spin 14s linear infinite, rays-in 0.8s ease-out both;
}
.catch[data-rar="3"] .catch-art::before { width: 320px; height: 320px; margin: -160px 0 0 -160px; background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--rar) 45%, transparent) 0deg 6deg, transparent 6deg 20deg); }
.catch[data-rar="3"] { box-shadow: 0 0 90px color-mix(in srgb, var(--rar) 30%, transparent); }
@keyframes rays-spin { to { rotate: 360deg; } }
@keyframes rays-in { from { opacity: 0; scale: 0.3; } }
.catch:not([hidden]) .catch-tags .tag { animation: tag-pop 0.4s cubic-bezier(0.2, 1.6, 0.4, 1) both; animation-delay: calc(0.45s + var(--i, 0) * 0.12s); }
@keyframes tag-pop { from { opacity: 0; transform: scale(0.6) translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .catch-art::before, .catch-art .art, .catch-tags .tag, .tip.coach, .coach-target { animation: none !important; } }

/* sound toggle in the deep */
.sound-btn { width: 30px; padding: 0; justify-content: center; font-size: 14px; }
.sound-btn[aria-pressed="false"] { opacity: 0.5; text-decoration: line-through; }
.sound-btn[aria-pressed="true"] { color: var(--cyan); text-shadow: 0 0 8px rgba(79, 243, 255, 0.6); }

/* settings on this device */
.settings { margin-top: 8px; display: grid; gap: 8px; }
.settings .sheet-h { margin-left: 0; margin-right: 0; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(140, 190, 255, 0.025); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.setting-text { display: flex; flex-direction: column; gap: 2px; }
.setting-text b { font-weight: 500; font-size: 13px; }
.setting-text small { color: var(--faint); font-size: 11px; line-height: 1.4; }
.switch { flex: none; width: 34px; height: 20px; border-radius: 999px; background: rgba(140, 190, 255, 0.15); position: relative; transition: background 0.2s; }
.switch i { position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: transform 0.2s, background 0.2s; }
.setting[aria-pressed="true"] .switch { background: rgba(79, 243, 255, 0.35); }
.setting[aria-pressed="true"] .switch i { transform: translateX(14px); background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }

/* ---- round 11: managing your tank fish, tricks, snapshots ---- */
/* the bowl: your tank spots first, then the bowl */
.bowl-list .bowl-sec { list-style: none; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 0; border: 0; background: none; }
.bowl-list .bowl-sec .sheet-h { margin: 14px 0 4px; }
.tslots { list-style: none; display: grid; gap: 8px; padding: 0; border: 0; background: none; }
.tslot { display: grid; grid-template-columns: 88px 1fr auto; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid rgba(79, 243, 255, 0.28); border-radius: 10px; background: rgba(79, 243, 255, 0.035); }
.tslot-art { display: flex; justify-content: center; overflow: hidden; }
.tslot-art .art { font-size: 9px; margin: 0; }
.tslot-info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tslot-acts { display: flex; flex-direction: column; gap: 6px; }
.tslot.empty { grid-template-columns: 40px 1fr; border-style: dashed; border-color: var(--line); background: transparent; color: var(--faint); }
.tslot-plus { justify-self: center; font-size: 18px; color: var(--faint); }
@media (max-width: 480px) {
  .tslot { grid-template-columns: 64px 1fr; }
  .tslot-art .art { font-size: 7px; }
  .tslot-acts { grid-column: 1 / -1; flex-direction: row; justify-content: flex-end; }
}
.sorts { display: inline-flex; gap: 4px; }
.sort { height: 24px; padding: 0 9px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--faint); font: inherit; font-size: 11px; cursor: pointer; }
.sort[aria-pressed="true"] { color: var(--ink); border-color: rgba(79, 243, 255, 0.45); background: rgba(79, 243, 255, 0.08); }

/* the swap picker */
.swap b { display: block; font-weight: 500; }
.swap small { display: block; color: var(--faint); margin: 2px 0 8px; }
.swap-list { display: grid; gap: 6px; }
.swap-item { display: grid; grid-template-columns: 70px 1fr; align-items: center; gap: 10px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: rgba(140, 190, 255, 0.04); color: var(--ink); font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.swap-item:hover { border-color: rgba(79, 243, 255, 0.45); }
.swap-item .art { font-size: 6px; margin: 0; justify-self: center; }

/* your fish's card */
.card-mine { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }
.card-trick { color: var(--amber); font-size: 11px; margin-top: 6px; }
#card input.rename { width: 100%; }

/* snapshot */
.snap { position: absolute; bottom: 10px; right: 10px; z-index: 3; height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: rgba(4, 12, 26, 0.7); color: var(--muted); font: inherit; font-size: 11px; cursor: pointer; font-variant-ligatures: none; }
.snap:hover { color: var(--ink); border-color: rgba(79, 243, 255, 0.45); }
.cube.snapped::after { content: ''; position: absolute; inset: 0; background: #fff; pointer-events: none; animation: snap-flash 0.45s ease-out forwards; z-index: 4; }
@keyframes snap-flash { from { opacity: 0.55; } to { opacity: 0; } }
.cube:has(#card:not([hidden])) .snap { display: none; }
/* the card sits over moving fish: make it solid enough to read */
.card { background: rgba(4, 10, 24, 0.9); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.card-mine .btn { white-space: nowrap; border: 1px solid var(--line); }
@media (max-width: 480px) { .card { flex-wrap: wrap; } .card > .art { font-size: 10px; } .card-body { flex: 1 1 100%; } }

/* ---- the shared place: presence, reef, bottles, gestures ---- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* send a bottle: bottom-left of the tank, opposite the camera */
.bottle-btn { left: 10px; right: auto; color: #9dffcf; }
.bottle-btn:hover { border-color: rgba(157, 255, 207, 0.45); }
.cube:has(#card:not([hidden])) .bottle-btn { display: none; }

/* the ledge under the tank: tap it to knock on the glass */
.pedestal { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pedestal:active { border-top-color: rgba(200, 240, 255, 0.9); }
.knock-hint { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; color: var(--faint); font-size: 10px; letter-spacing: 0.04em; pointer-events: none; transition: opacity 0.6s; }
.pedestal.knocked .knock-hint { opacity: 0; }

/* the Fish tab glows during a bloom, and wears a star while a legend visits */
#go-fish.bloom { color: #ffd6f3; background: rgba(255, 111, 216, 0.08); box-shadow: inset 0 0 0 1px rgba(255, 111, 216, 0.35), 0 0 20px rgba(255, 111, 216, 0.22); animation: breathe 3.2s ease-in-out infinite; }
#go-fish.bloom .tab-icon { color: #ff9ae6; text-shadow: 0 0 10px rgba(255, 111, 216, 0.9); }
#go-fish.has-legend::after { content: '★'; position: absolute; top: 5px; left: 12px; color: #ff6fd8; font-size: 11px; text-shadow: 0 0 8px rgba(255, 111, 216, 0.9); }

/* your fish's card: little things it can say */
.card-emotes { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.emote-btn { min-width: 34px; height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: rgba(140, 190, 255, 0.05); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; font-variant-ligatures: none; }
.emote-btn:hover { border-color: rgba(79, 243, 255, 0.45); }
.emote-btn:active { transform: scale(0.94); }
.emote-btn.call { margin-left: auto; font-size: 11px; color: var(--cyan); }

/* bottles */
.bottle-art { font-size: 22px; padding: 0 4px; }
.bottle-line { margin: 8px 0 6px; padding: 8px 12px; border-left: 2px solid rgba(157, 255, 207, 0.5); color: #e8fff4; font-size: 14px; line-height: 1.45; }
.stickers { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.stickers small { color: var(--faint); margin-right: 2px; }
.sticker { width: 34px; height: 32px; border: 1px solid var(--line); border-radius: 8px; background: rgba(157, 255, 207, 0.05); color: #ffd6f3; font: inherit; font-size: 15px; cursor: pointer; }
.sticker:hover { border-color: rgba(157, 255, 207, 0.5); }
.sticker-sent, .bottle-got { color: #9dffcf; font-size: 12px; }
.bottle-got { display: flex; gap: 8px; font-size: 16px; margin-top: 6px; color: #ffd6f3; }
.sheet-note { color: var(--muted); font-size: 12px; margin: 0 0 12px; }
.bottle-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bottle-pick { width: 100%; display: flex; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(157, 255, 207, 0.03); color: var(--ink); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.bottle-pick span { color: #9dffcf; }
.bottle-pick:hover { border-color: rgba(157, 255, 207, 0.45); }
.bottle-pick[aria-disabled="true"] { opacity: 0.5; cursor: default; }
.bottle-left { color: var(--muted); font-size: 12px; font-weight: 400; margin-left: 6px; }

/* the reef's card */
.reef-art { font-size: 14px; color: #ff7aa8; text-shadow: 0 0 8px rgba(255, 122, 168, 0.6); }
.card-note { color: var(--muted); font-size: 12px; margin: 6px 0 4px; max-width: 34ch; }
.reef-next { display: grid; gap: 4px; font-size: 12px; margin: 6px 0; }
.reef-names { display: block; color: var(--faint); font-size: 11px; }
.chip.legend { color: #ffb3ea; border-color: rgba(255, 111, 216, 0.45); }

/* next week's water */
.vote { margin: 14px 16px 0; }
.vote-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.vote-head b { font-weight: 500; }
.vote-head small, .vote-now { color: var(--faint); font-size: 11px; }
.vote-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.vote-opt { display: grid; gap: 4px; justify-items: center; padding: 8px 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(140, 190, 255, 0.03); color: var(--ink); font: inherit; font-size: 12px; cursor: pointer; }
.vote-opt:hover { border-color: rgba(79, 243, 255, 0.4); }
.vote-opt.on { border-color: rgba(79, 243, 255, 0.7); background: rgba(79, 243, 255, 0.08); box-shadow: 0 0 14px rgba(79, 243, 255, 0.15); }
.vote-opt b { font-weight: 500; }
.vote-opt small { color: var(--muted); font-variant-numeric: tabular-nums; }
.vote-sw { width: 100%; height: 40px; border-radius: 6px; display: flex; align-items: flex-end; justify-content: center; gap: 10px; padding-bottom: 4px; font-size: 13px; text-shadow: 0 0 6px currentColor; }
.vote-now { display: block; margin-top: 8px; }

/* ---- round 14: username + password ---- */
.pw-row { position: relative; display: flex; }
.pw-row input { flex: 1; padding-right: 64px; }
.pw-show {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; color: var(--muted, #8fb8ff); font: inherit; font-size: 12px;
  padding: 6px 8px; cursor: pointer; border-radius: 6px;
}
.pw-show:hover, .pw-show:focus-visible { color: #e8f4ff; }
.small-note { font-size: 12px; margin: 10px 0 0; }
.col-form .err:empty { display: none; }
.pw-change { margin: 14px 0 4px; }
.pw-change summary { cursor: pointer; color: var(--muted, #8fb8ff); font-size: 13px; padding: 4px 0; }
.pw-change[open] summary { margin-bottom: 8px; }
