:root {
  --bg-top: #060a14;
  --bg-bottom: #02040a;
  --surface: rgba(18, 28, 48, 0.55);
  --surface-solid: #0e1626;
  --surface-2: rgba(28, 42, 68, 0.6);
  --glass-border: rgba(140, 220, 255, 0.16);
  --ink: #eaf6fb;
  --muted: #83a0b3;
  --cyan: #35e6ff;
  --cyan-soft: rgba(53, 230, 255, 0.35);
  --turquoise: #2de3c2;
  --violet: #8a6bff;
  --magenta: #ff5fd6;
  --accent: var(--cyan);
  --accent-ink: #04141a;
  --wave-1: rgba(53, 230, 255, 0.16);
  --wave-2: rgba(138, 107, 255, 0.12);
  --danger: #ff6b6b;
  --radius-lg: 20px;
  --radius-md: 14px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

:root[data-accent="amber"] {
  --cyan: #ffb648;
  --cyan-soft: rgba(255, 182, 72, 0.35);
  --turquoise: #ff8a3d;
  --accent-ink: #241200;
}
:root[data-accent="violet"] {
  --cyan: #a78bfa;
  --cyan-soft: rgba(167, 139, 250, 0.35);
  --turquoise: #8a6bff;
  --accent-ink: #140c2e;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  background: radial-gradient(120% 90% at 50% -10%, var(--bg-top), var(--bg-bottom) 65%);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  overscroll-behavior-y: contain;
}

body {
  position: relative;
  overflow-x: hidden;
  /* extremely subtle grain, GPU-cheap: single tiny svg noise tile */
  background-image:
    radial-gradient(120% 90% at 50% -10%, var(--bg-top), var(--bg-bottom) 65%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
}

/* ---------- Ambient background: waves + canvas particles ---------- */
#wave-bg { position: fixed; inset: 0; z-index: 0; opacity: 0.28; pointer-events: none; }
#wave-bg svg { position: absolute; bottom: 0; width: 100%; height: 30vh; }
.wave { fill: var(--wave-1); }
.wave-2 { fill: var(--wave-2); }
.wave-1 { animation: drift 14s ease-in-out infinite alternate; }
.wave-2 { animation: drift 10s ease-in-out infinite alternate-reverse; }
@keyframes drift { from { transform: translateX(-3%); } to { transform: translateX(3%); } }

#particle-canvas {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0.55;
}

.light-ray {
  position: fixed; top: -20%; z-index: 0; pointer-events: none;
  width: 45vw; height: 140vh;
  background: linear-gradient(180deg, rgba(53,230,255,0.10), transparent 60%);
  filter: blur(30px);
  animation: raysway 18s ease-in-out infinite alternate;
}
.light-ray.r2 { left: 55%; background: linear-gradient(180deg, rgba(138,107,255,0.08), transparent 60%); animation-duration: 22s; animation-direction: alternate-reverse; }
.light-ray.r1 { left: -5%; }
@keyframes raysway { from { transform: translateX(0) rotate(8deg); } to { transform: translateX(6vw) rotate(4deg); } }

@media (prefers-reduced-motion: reduce) {
  .wave-1, .wave-2, .light-ray { animation: none; }
}

/* ---------- Login ---------- */
.screen {
  position: relative; z-index: 1; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; padding-top: calc(24px + var(--safe-top)); padding-bottom: calc(24px + var(--safe-bottom));
}
.login-card {
  width: 100%; max-width: 380px; text-align: center; animation: rise 0.6s var(--ease);
  background: var(--surface); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border); border-radius: var(--radius-lg);
  padding: 34px 26px; box-shadow: 0 1px 0 rgba(255,255,255,0.05) inset, 0 20px 50px rgba(0,0,0,0.4);
}
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
.login-icon {
  width: 84px; height: 84px; border-radius: 22px;
  box-shadow: 0 0 0 1px var(--glass-border), 0 12px 40px rgba(53,230,255,0.25);
  margin-bottom: 18px;
}
.login-card h1 {
  font-size: 26px; margin: 0 0 8px; letter-spacing: -0.01em;
  background: linear-gradient(135deg, #fff, var(--cyan) 130%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.login-card .muted { color: var(--muted); margin: 0 0 26px; font-size: 15px; }
#login-form { display: flex; flex-direction: column; gap: 12px; }
#passcode-input, #name-input {
  width: 100%; padding: 16px 18px; border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: var(--surface); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  color: var(--ink); font-size: 17px; text-align: center; letter-spacing: 0.12em;
  transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease);
}
#passcode-input:focus, #name-input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 4px var(--cyan-soft); }
.error { color: var(--danger); font-size: 14px; margin-top: 14px; }

/* ---------- Neon buttons ---------- */
.btn-primary {
  position: relative; overflow: hidden;
  padding: 16px; border: 1px solid var(--glass-border); border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--cyan), var(--turquoise));
  color: var(--accent-ink); font-size: 17px; font-weight: 700;
  box-shadow: 0 0 24px var(--cyan-soft), 0 8px 20px rgba(0,0,0,0.35);
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), filter 180ms var(--ease);
}
.btn-primary::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.35) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 600ms var(--ease);
}
.btn-primary:hover::after { transform: translateX(120%); }
.btn-primary:active { transform: scale(0.97) translateY(1px); filter: brightness(0.95); box-shadow: 0 0 14px var(--cyan-soft); }

/* ---------- App shell ---------- */
#app { position: relative; z-index: 1; min-height: 100dvh; display: flex; flex-direction: column; }

.app-header {
  position: sticky; top: 0; z-index: 5;
  padding-top: var(--safe-top);
  background: rgba(4, 8, 16, 0.5);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background 260ms var(--ease), border-color 260ms var(--ease), backdrop-filter 260ms var(--ease);
}
.app-header.scrolled {
  background: rgba(3, 6, 12, 0.82);
  border-bottom-color: var(--glass-border);
  box-shadow: 0 8px 30px rgba(0,0,0,0.35);
}
.app-header-inner { display: flex; align-items: center; gap: 10px; padding: 14px 16px; }
.brandmark img { width: 30px; height: 30px; border-radius: 8px; display: block; filter: drop-shadow(0 0 10px var(--cyan-soft)); }
.app-header h1 {
  flex: 1; min-width: 0;
  font-size: 20px; margin: 0; font-weight: 700; letter-spacing: -0.01em;
  background: linear-gradient(135deg, #fff, var(--cyan) 130%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.header-icon-btn {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  background: none; border: none; color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  transition: background 180ms var(--ease), transform 180ms var(--ease);
}
.header-icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.header-icon-btn:active { transform: scale(0.88); background: var(--surface-2); }

.view-container { flex: 1; padding: 18px 16px calc(100px + var(--safe-bottom)); max-width: 640px; width: 100%; margin: 0 auto; perspective: 900px; overflow-y: auto; }

.view { animation: fadein 320ms var(--ease); }
@keyframes fadein {
  from { opacity: 0; transform: translateY(10px); filter: blur(4px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* ---------- Filter chips ---------- */
.chip-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 16px; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--surface); backdrop-filter: blur(10px);
  color: var(--muted); font-size: 13px; font-weight: 700; white-space: nowrap;
  transition: transform 180ms var(--ease), color 180ms var(--ease), border-color 180ms var(--ease), background 180ms var(--ease), box-shadow 180ms var(--ease);
}
.chip:active { transform: scale(0.94); }
.chip.active {
  color: var(--ink); border-color: var(--cyan);
  background: linear-gradient(135deg, rgba(53,230,255,0.18), rgba(138,107,255,0.14));
  box-shadow: 0 0 18px var(--cyan-soft), inset 0 0 12px rgba(53,230,255,0.12);
}

/* ---------- Tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: repeat(5, 1fr);
  align-items: center;
  padding: 8px 6px calc(8px + var(--safe-bottom));
  background: rgba(3, 6, 12, 0.75);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  border-top: 1px solid var(--glass-border);
}
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none; color: var(--muted);
  font-size: 11px; font-weight: 600; padding: 6px 0;
  transition: color 180ms var(--ease), transform 180ms var(--ease);
}
.tab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: filter 180ms var(--ease); }
.tab.active { color: var(--cyan); }
.tab.active svg { filter: drop-shadow(0 0 6px var(--cyan-soft)); }
.tab:active { transform: scale(0.92); }
.tab-log {
  position: relative; top: -18px;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  color: var(--accent-ink);
  width: 54px; height: 54px; border-radius: 50%;
  margin: 0 auto; justify-self: center;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.15), 0 0 26px var(--cyan-soft), 0 10px 24px rgba(0,0,0,0.4);
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease);
}
.tab-log:active { transform: scale(0.9); }
.tab-log svg { width: 26px; height: 26px; stroke: var(--accent-ink); stroke-width: 2.4; }
.tab-log.active { color: var(--accent-ink); }

/* ---------- Cards (glass) ---------- */
.card {
  position: relative;
  background: var(--surface);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 14px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 1px 0 rgba(255,255,255,0.05) inset, 0 12px 30px rgba(0,0,0,0.25);
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  animation: cardin 560ms var(--ease) forwards;
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease), border-color 220ms var(--ease);
  will-change: transform;
}
@keyframes cardin { to { opacity: 1; transform: translateY(0) scale(1); } }

@media (hover: hover) and (pointer: fine) {
  .card:hover {
    transform: translateY(-3px) scale(1.015);
    border-color: var(--cyan-soft);
    box-shadow: 0 1px 0 rgba(255,255,255,0.07) inset, 0 18px 40px rgba(0,0,0,0.4), 0 0 26px rgba(53,230,255,0.12);
  }
}

.catch-card { display: flex; gap: 14px; align-items: flex-start; }
.catch-emoji {
  flex: none; width: 52px; height: 52px; border-radius: var(--radius-md);
  background: var(--surface-2); border: 1px solid var(--glass-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; line-height: 1;
  animation: bob 4.5s ease-in-out infinite;
  filter: drop-shadow(0 0 8px rgba(53,230,255,0.25));
}
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .catch-emoji { animation: none; } }
.card:active { transform: scale(0.985); }

.catch-main { flex: 1; min-width: 0; }
.catch-title { font-weight: 700; font-size: 16px; margin: 0 0 2px; }
.catch-meta { color: var(--muted); font-size: 13px; margin: 0 0 6px; }
.catch-stats { display: flex; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.pill { background: var(--surface-2); border: 1px solid var(--glass-border); border-radius: 999px; padding: 4px 10px; color: var(--ink); }
.pill.tag-salt { color: var(--cyan); }
.pill.tag-fresh { color: var(--turquoise); }
.catch-notes { margin-top: 8px; font-size: 14px; color: var(--muted); }

.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state .big-emoji { font-size: 48px; display: block; margin-bottom: 12px; }

.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 22px 0 10px; }
.section-title:first-child { margin-top: 0; }

.section-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 22px 0 10px; }
.section-header:first-child { margin-top: 0; }
.section-header .section-title { margin: 0; }

.angler-link { color: var(--cyan); cursor: pointer; }
.angler-link:active { opacity: 0.7; }

/* Spots */
.spot-row { display: flex; align-items: center; gap: 14px; }
.spot-rank {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--glass-border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: var(--cyan); flex-shrink: 0;
}
.spot-info { flex: 1; min-width: 0; }
.spot-name { font-weight: 700; font-size: 16px; }
.spot-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.hot-badge {
  background: linear-gradient(135deg, var(--magenta), var(--violet));
  color: #fff;
  font-size: 11px; font-weight: 800;
  padding: 3px 9px; border-radius: 999px;
  box-shadow: 0 0 16px rgba(255,95,214,0.45);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .hot-badge { animation: none; } }

/* Conditions */
.weather-hero { text-align: center; padding: 30px 10px; }
.weather-temp {
  font-size: 56px; font-weight: 800; line-height: 1; letter-spacing: -0.02em;
  text-shadow: 0 0 30px var(--cyan-soft);
}
.weather-desc { color: var(--muted); margin-top: 6px; font-size: 15px; }
.weather-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.weather-stat { background: var(--surface-2); border: 1px solid var(--glass-border); border-radius: var(--radius-md); padding: 12px; text-align: center; }
.weather-stat .val { font-size: 18px; font-weight: 700; }
.weather-stat .lbl { font-size: 11px; color: var(--muted); margin-top: 2px; text-transform: uppercase; letter-spacing: 0.05em; }

.tide-chart { display: flex; align-items: flex-end; gap: 3px; height: 90px; margin: 16px 0 6px; }
.tide-bar { flex: 1; background: linear-gradient(180deg, var(--cyan), #0f6e7d); border-radius: 4px 4px 0 0; transition: height 600ms var(--ease); box-shadow: 0 0 10px rgba(53,230,255,0.25); }
.tide-bar.now { background: linear-gradient(180deg, var(--magenta), var(--violet)); box-shadow: 0 0 14px rgba(255,95,214,0.4); }
.tide-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }

/* Form */
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 14px 16px; border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: var(--surface); backdrop-filter: blur(10px);
  color: var(--ink); font-size: 16px; font-family: inherit;
  transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease);
}
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 4px var(--cyan-soft); }
.form-field textarea { resize: vertical; min-height: 70px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

input[type="file"] {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-md);
  border: 1px solid var(--glass-border); background: var(--surface);
  color: var(--muted); font-size: 13px; font-family: inherit;
}
input[type="file"]::file-selector-button {
  background: linear-gradient(135deg, var(--cyan), var(--turquoise)); color: var(--accent-ink);
  border: none; border-radius: 8px; padding: 8px 14px; font-weight: 700; margin-right: 10px; cursor: pointer;
}
.photo-preview-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.photo-preview-thumb { position: relative; width: 64px; height: 64px; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--glass-border); }
.photo-preview-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-remove {
  position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(0,0,0,0.6); color: #fff; border: none; font-size: 13px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.photo-strip { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; }
.photo-thumb-wrap { flex: none; width: 84px; height: 84px; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--glass-border); background: var(--surface-2); }
.photo-thumb { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity 240ms var(--ease); }
.photo-thumb.loaded { opacity: 1; }
.segmented { display: flex; background: var(--surface); border: 1px solid var(--glass-border); border-radius: var(--radius-md); padding: 4px; gap: 4px; }
.segmented button {
  flex: 1; padding: 10px; border: none; border-radius: 10px;
  background: transparent; color: var(--muted); font-weight: 700; font-size: 14px;
  transition: background 200ms var(--ease), color 200ms var(--ease), box-shadow 200ms var(--ease);
}
.segmented button.active { background: linear-gradient(135deg, var(--cyan), var(--turquoise)); color: var(--accent-ink); box-shadow: 0 0 14px var(--cyan-soft); }

/* Crew leaderboard */
.crew-row { display: flex; align-items: center; gap: 12px; }
.crew-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--glass-border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: var(--cyan);
}
.crew-name { font-weight: 700; }
.crew-sub { color: var(--muted); font-size: 13px; }
.crew-medal { font-size: 22px; flex: none; color: var(--muted); font-weight: 800; }
.crew-row[data-angler] { cursor: pointer; }

/* Avatars (uploaded photo over an initial-letter fallback) */
.avatar-photo { position: relative; overflow: hidden; }
.avatar-photo .avatar-fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.avatar-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 240ms var(--ease); }
.avatar-photo img.loaded { opacity: 1; }

/* Profile */
.profile-hero { text-align: center; padding: 28px 18px; }
.profile-avatar { width: 64px; height: 64px; font-size: 24px; margin: 0 auto 12px; }
.profile-name { font-size: 22px; font-weight: 800; margin-bottom: 4px; }

/* Settings: your profile */
.profile-picker { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; }
.profile-picker-avatar { width: 56px; height: 56px; font-size: 20px; flex: none; }
.avatar-upload-label {
  display: inline-block; margin-top: 12px; padding: 10px 16px; border-radius: var(--radius-md);
  border: 1px solid var(--glass-border); background: var(--surface); color: var(--cyan);
  font-weight: 700; font-size: 13px; text-align: center; cursor: pointer;
}

/* Compare */
.compare-caption { text-align: center; color: var(--muted); font-size: 13px; margin: 0 0 16px; }
.compare-pickers { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.compare-pickers select {
  flex: 1; min-width: 0; padding: 12px 14px; border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: var(--surface); color: var(--ink); font-size: 15px; font-weight: 700; font-family: inherit;
  -webkit-appearance: none; appearance: none;
}
.compare-vs { color: var(--muted); font-weight: 800; font-size: 13px; flex: none; }
.compare-head { display: flex; justify-content: space-between; margin-bottom: 14px; }
.compare-name { font-weight: 800; font-size: 15px; flex: 1; text-align: center; }
.compare-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid var(--glass-border); }
.compare-row:first-of-type { border-top: none; }
.compare-val { text-align: center; font-weight: 700; font-size: 14px; color: var(--muted); }
.compare-val.lead { color: var(--cyan); text-shadow: 0 0 12px var(--cyan-soft); }
.compare-label { text-align: center; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }

/* Settings */
.settings-section { margin-bottom: 14px; }
.accent-row { display: flex; gap: 12px; margin-top: 4px; }
.accent-swatch {
  width: 44px; height: 44px; border-radius: 50%; border: 2px solid transparent;
  transition: transform 180ms var(--ease), border-color 180ms var(--ease);
}
.accent-swatch.active { border-color: var(--ink); transform: scale(1.08); }
.accent-swatch[data-accent="cyan"] { background: linear-gradient(135deg, #35e6ff, #2de3c2); }
.accent-swatch[data-accent="amber"] { background: linear-gradient(135deg, #ffb648, #ff8a3d); }
.accent-swatch[data-accent="violet"] { background: linear-gradient(135deg, #a78bfa, #8a6bff); }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.settings-row .crew-sub { max-width: 220px; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: calc(96px + var(--safe-bottom));
  transform: translateX(-50%) translateY(20px);
  background: var(--surface-solid);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
  padding: 14px 20px; border-radius: 999px;
  font-weight: 600; font-size: 14px; z-index: 50;
  opacity: 0;
  transition: opacity 260ms var(--ease), transform 260ms var(--ease);
  display: flex; align-items: center; gap: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.45), 0 0 20px var(--cyan-soft);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast .toast-emoji { font-size: 18px; }

/* Fly-to-header catch animation */
.fly-catch {
  position: fixed; z-index: 60; font-size: 26px; pointer-events: none;
  filter: drop-shadow(0 0 10px var(--cyan-soft));
}

/* Skeleton loading */
.skeleton { background: linear-gradient(90deg, var(--surface-solid) 25%, var(--surface-2) 50%, var(--surface-solid) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--radius-md); border: 1px solid var(--glass-border); }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.skeleton-card { height: 74px; margin-bottom: 14px; }

/* Boot / loading splash */
#boot-splash {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-bottom);
  transition: opacity 420ms var(--ease);
}
#boot-splash.hide { opacity: 0; pointer-events: none; }
#boot-fish {
  font-size: 46px;
  animation: swim-across 1.6s var(--ease) infinite;
  filter: drop-shadow(0 0 16px var(--cyan-soft));
}
@keyframes swim-across {
  0% { transform: translateX(-120px) scaleX(1); }
  49% { transform: translateX(120px) scaleX(1); }
  50% { transform: translateX(120px) scaleX(-1); }
  99% { transform: translateX(-120px) scaleX(-1); }
  100% { transform: translateX(-120px) scaleX(1); }
}
@media (prefers-reduced-motion: reduce) { #boot-fish { animation: none; } }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 560ms var(--ease), transform 560ms var(--ease); }
.reveal.in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

button { font-family: inherit; cursor: pointer; }
