/* ============================================================
   FISH FOUNDATION v1.0.0
   Component Library — Fish Translator Design System

   Requires: fish-tokens.css loaded first.
   Mobile-first responsive design. All measurements use tokens.
   ============================================================ */


/* ============================================================
   0. RESET & NORMALIZE
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  tab-size: 4;
  line-height: 1.5;
  font-family: var(--fish-font-body);
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--fish-bg);
  color: var(--fish-text);
  font-size: var(--fish-text-base);
  line-height: var(--fish-leading-normal);
  overflow-x: hidden;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

a {
  color: var(--fish-text-link);
  text-decoration: none;
  transition: var(--fish-transition-color);
}

a:hover {
  color: var(--fish-text-link-hover);
}

a:focus-visible {
  outline: 2px solid var(--fish-outline-focus);
  outline-offset: 2px;
  border-radius: var(--fish-radius-sm);
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--fish-font-display);
  font-weight: var(--fish-weight-bold);
  line-height: var(--fish-leading-tight);
  color: var(--fish-text);
  overflow-wrap: break-word;
}

p {
  overflow-wrap: break-word;
  max-width: var(--fish-prose-width);
}

hr {
  border: none;
  height: 1px;
  background: var(--fish-divider);
  margin: var(--fish-space-8) 0;
}

code, kbd, pre, samp {
  font-family: var(--fish-font-mono);
  font-size: 0.9em;
}

pre {
  overflow-x: auto;
  padding: var(--fish-space-4);
  background: var(--fish-bg-deep);
  border: 1px solid var(--fish-card-border);
  border-radius: var(--fish-radius-md);
}

code {
  padding: var(--fish-space-0_5) var(--fish-space-1_5);
  background: var(--fish-card);
  border-radius: var(--fish-radius-sm);
}

pre code {
  padding: 0;
  background: none;
  border-radius: 0;
}

table {
  border-collapse: collapse;
  width: 100%;
}

::selection {
  background: var(--fish-accent-ghost);
  color: var(--fish-accent-bright);
}

/* Focus visible for all interactive elements */
:focus-visible {
  outline: 2px solid var(--fish-outline-focus);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--fish-scrollbar-track);
}

::-webkit-scrollbar-thumb {
  background: var(--fish-scrollbar-thumb);
  border-radius: var(--fish-radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--fish-scrollbar-thumb-hover);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--fish-scrollbar-thumb) var(--fish-scrollbar-track);
}


/* ============================================================
   1. LAYOUT — Container, Grid, Flex
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--fish-container-xl);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--fish-space-4);
  padding-right: var(--fish-space-4);
}

.container-sm  { max-width: var(--fish-container-sm); }
.container-md  { max-width: var(--fish-container-md); }
.container-lg  { max-width: var(--fish-container-lg); }
.container-xl  { max-width: var(--fish-container-xl); }
.container-2xl { max-width: var(--fish-container-2xl); }
.container-full { max-width: 100%; }

.container-prose {
  max-width: var(--fish-prose-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--fish-space-4);
  padding-right: var(--fish-space-4);
}

/* CSS Grid system */
.grid {
  display: grid;
  gap: var(--fish-space-4);
}

.grid-cols-1  { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2  { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3  { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4  { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-cols-5  { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-cols-6  { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }

.grid-auto-fill-sm  { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.grid-auto-fill-md  { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-auto-fill-lg  { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }
.grid-auto-fit-sm   { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid-auto-fit-md   { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-auto-fit-lg   { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }

.col-span-2  { grid-column: span 2 / span 2; }
.col-span-3  { grid-column: span 3 / span 3; }
.col-span-4  { grid-column: span 4 / span 4; }
.col-span-6  { grid-column: span 6 / span 6; }
.col-span-8  { grid-column: span 8 / span 8; }
.col-span-12 { grid-column: span 12 / span 12; }
.col-span-full { grid-column: 1 / -1; }

.row-span-2  { grid-row: span 2 / span 2; }
.row-span-3  { grid-row: span 3 / span 3; }

/* Gap variants */
.gap-0    { gap: 0; }
.gap-1    { gap: var(--fish-space-1); }
.gap-2    { gap: var(--fish-space-2); }
.gap-3    { gap: var(--fish-space-3); }
.gap-4    { gap: var(--fish-space-4); }
.gap-6    { gap: var(--fish-space-6); }
.gap-8    { gap: var(--fish-space-8); }
.gap-10   { gap: var(--fish-space-10); }
.gap-12   { gap: var(--fish-space-12); }

/* Flexbox utilities */
.flex           { display: flex; }
.flex-inline    { display: inline-flex; }
.flex-col       { flex-direction: column; }
.flex-row       { flex-direction: row; }
.flex-wrap      { flex-wrap: wrap; }
.flex-nowrap    { flex-wrap: nowrap; }
.flex-1         { flex: 1 1 0%; }
.flex-auto      { flex: 1 1 auto; }
.flex-none      { flex: none; }
.flex-grow      { flex-grow: 1; }
.flex-shrink-0  { flex-shrink: 0; }

.items-start    { align-items: flex-start; }
.items-center   { align-items: center; }
.items-end      { align-items: flex-end; }
.items-stretch  { align-items: stretch; }
.items-baseline { align-items: baseline; }

.justify-start    { justify-content: flex-start; }
.justify-center   { justify-content: center; }
.justify-end      { justify-content: flex-end; }
.justify-between  { justify-content: space-between; }
.justify-around   { justify-content: space-around; }
.justify-evenly   { justify-content: space-evenly; }

.self-start   { align-self: flex-start; }
.self-center  { align-self: center; }
.self-end     { align-self: flex-end; }
.self-stretch { align-self: stretch; }

/* Layout helpers */
.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.page-content {
  flex: 1;
  padding-top: var(--fish-nav-height);
}

.section {
  padding: var(--fish-space-12) 0;
}

.section-lg {
  padding: var(--fish-space-20) 0;
}

.center-content {
  display: flex;
  align-items: center;
  justify-content: center;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--fish-space-4);
}

.stack-sm { gap: var(--fish-space-2); }
.stack-lg { gap: var(--fish-space-8); }

.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--fish-space-3);
  align-items: center;
}

/* Sidebar layout (content + aside) */
.with-sidebar {
  display: flex;
  gap: var(--fish-space-6);
}

.with-sidebar > :first-child {
  flex: 1;
  min-width: 0;
}

.with-sidebar > :last-child {
  flex-basis: var(--fish-sidebar-width);
  flex-shrink: 0;
}

/* Divider */
.divider {
  width: 100%;
  height: 1px;
  background: var(--fish-divider);
  margin: var(--fish-space-6) 0;
}

.divider-vertical {
  width: 1px;
  align-self: stretch;
  background: var(--fish-divider);
  margin: 0 var(--fish-space-4);
}


/* ============================================================
   2. CARDS
   ============================================================ */

.fish-card {
  background: var(--fish-card);
  border: 1px solid var(--fish-card-border);
  border-radius: var(--fish-radius-card);
  padding: var(--fish-space-5);
  transition:
    background-color var(--fish-duration-normal) var(--fish-ease-default),
    border-color var(--fish-duration-normal) var(--fish-ease-default),
    box-shadow var(--fish-duration-normal) var(--fish-ease-default),
    transform var(--fish-duration-normal) var(--fish-ease-default);
}

.fish-card:hover {
  background: var(--fish-card-hover);
  border-color: var(--fish-card-border-hover);
  box-shadow: var(--fish-shadow-glow);
}

.fish-card.active,
.fish-card.is-active {
  background: var(--fish-card-active);
  border-color: var(--fish-card-border-active);
  box-shadow: var(--fish-shadow-glow);
}

.fish-card-clickable {
  cursor: pointer;
}

.fish-card-clickable:hover {
  transform: translateY(-2px);
  box-shadow: var(--fish-shadow-md), var(--fish-shadow-glow);
}

.fish-card-clickable:active {
  transform: translateY(0);
}

/* Card sizes */
.fish-card-sm {
  padding: var(--fish-space-3);
}

.fish-card-lg {
  padding: var(--fish-space-8);
}

.fish-card-flush {
  padding: 0;
}

/* Card sections */
.fish-card-header {
  padding: var(--fish-space-4) var(--fish-space-5);
  border-bottom: 1px solid var(--fish-divider);
}

.fish-card-body {
  padding: var(--fish-space-5);
}

.fish-card-footer {
  padding: var(--fish-space-4) var(--fish-space-5);
  border-top: 1px solid var(--fish-divider);
}

.fish-card-flush > .fish-card-header { padding: var(--fish-space-4); }
.fish-card-flush > .fish-card-body   { padding: var(--fish-space-4); }
.fish-card-flush > .fish-card-footer { padding: var(--fish-space-4); }

/* Card media */
.fish-card-media {
  margin: calc(-1 * var(--fish-space-5));
  margin-bottom: var(--fish-space-4);
  overflow: hidden;
  border-radius: var(--fish-radius-card) var(--fish-radius-card) 0 0;
}

.fish-card-media img {
  width: 100%;
  height: auto;
  display: block;
}

/* Glass morphism card */
.fish-card-glass {
  background: var(--fish-glass);
  backdrop-filter: blur(var(--fish-glass-blur));
  -webkit-backdrop-filter: blur(var(--fish-glass-blur));
  border: 1px solid var(--fish-glass-border);
  border-radius: var(--fish-radius-card);
  padding: var(--fish-space-5);
  transition:
    background-color var(--fish-duration-normal) var(--fish-ease-default),
    border-color var(--fish-duration-normal) var(--fish-ease-default),
    box-shadow var(--fish-duration-normal) var(--fish-ease-default);
}

.fish-card-glass:hover {
  border-color: var(--fish-card-border-hover);
  box-shadow: var(--fish-shadow-glow);
}

/* Heavy glass — for overlays on busy backgrounds */
.fish-card-glass-heavy {
  background: var(--fish-glass-heavy);
  backdrop-filter: blur(var(--fish-glass-heavy-blur));
  -webkit-backdrop-filter: blur(var(--fish-glass-heavy-blur));
  border: 1px solid var(--fish-glass-border);
  border-radius: var(--fish-radius-card);
  padding: var(--fish-space-5);
}

/* Raised card — solid background, stronger shadow */
.fish-card-raised {
  background: var(--fish-bg-raised);
  border: 1px solid var(--fish-card-border);
  border-radius: var(--fish-radius-card);
  padding: var(--fish-space-5);
  box-shadow: var(--fish-shadow-md);
}

/* Accent border top */
.fish-card-accent {
  border-top: 3px solid var(--fish-accent);
}

.fish-card-accent-gold {
  border-top: 3px solid var(--fish-gold);
}


/* ============================================================
   3. BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--fish-space-2);
  height: var(--fish-btn-height);
  padding: 0 var(--fish-space-5);
  font-family: var(--fish-font-body);
  font-size: var(--fish-text-sm);
  font-weight: var(--fish-weight-semibold);
  line-height: 1;
  letter-spacing: var(--fish-tracking-wide);
  border: 1px solid transparent;
  border-radius: var(--fish-radius-btn);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  text-decoration: none;
  transition:
    background-color var(--fish-duration-fast) var(--fish-ease-default),
    border-color var(--fish-duration-fast) var(--fish-ease-default),
    color var(--fish-duration-fast) var(--fish-ease-default),
    box-shadow var(--fish-duration-fast) var(--fish-ease-default),
    transform var(--fish-duration-fast) var(--fish-ease-default),
    opacity var(--fish-duration-fast) var(--fish-ease-default);
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled,
.btn.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* Button sizes */
.btn-sm {
  height: var(--fish-btn-height-sm);
  padding: 0 var(--fish-space-3);
  font-size: var(--fish-text-xs);
}

.btn-lg {
  height: var(--fish-btn-height-lg);
  padding: 0 var(--fish-space-8);
  font-size: var(--fish-text-base);
}

.btn-xl {
  height: 60px;
  padding: 0 var(--fish-space-10);
  font-size: var(--fish-text-lg);
  border-radius: var(--fish-radius-lg);
}

.btn-block {
  width: 100%;
}

.btn-icon {
  width: var(--fish-btn-height);
  padding: 0;
}

.btn-icon.btn-sm { width: var(--fish-btn-height-sm); }
.btn-icon.btn-lg { width: var(--fish-btn-height-lg); }

/* Primary — Cyan fill */
.btn-primary {
  background: var(--fish-accent);
  color: var(--fish-text-inverse);
  border-color: var(--fish-accent);
}

.btn-primary:hover {
  background: var(--fish-accent-bright);
  border-color: var(--fish-accent-bright);
  box-shadow: var(--fish-shadow-glow);
  color: var(--fish-text-inverse);
}

.btn-primary:focus-visible {
  box-shadow: 0 0 0 3px var(--fish-accent-ghost);
}

/* Secondary — Outline */
.btn-secondary {
  background: transparent;
  color: var(--fish-accent);
  border-color: var(--fish-accent-dim);
}

.btn-secondary:hover {
  background: var(--fish-accent-ghost);
  border-color: var(--fish-accent);
  color: var(--fish-accent-bright);
}

/* Ghost — No border */
.btn-ghost {
  background: transparent;
  color: var(--fish-text-muted);
  border-color: transparent;
}

.btn-ghost:hover {
  background: var(--fish-card);
  color: var(--fish-text);
}

/* Gold — Achievement / Premium */
.btn-gold {
  background: linear-gradient(135deg, var(--fish-gold) 0%, var(--fish-gold-bright) 100%);
  color: var(--fish-text-inverse);
  border-color: var(--fish-gold);
}

.btn-gold:hover {
  background: linear-gradient(135deg, var(--fish-gold-bright) 0%, var(--fish-gold) 100%);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
  color: var(--fish-text-inverse);
}

/* Danger */
.btn-danger {
  background: var(--fish-red);
  color: #fff;
  border-color: var(--fish-red);
}

.btn-danger:hover {
  background: var(--fish-red-bright);
  border-color: var(--fish-red-bright);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.25);
}

/* Success */
.btn-success {
  background: var(--fish-green);
  color: var(--fish-text-inverse);
  border-color: var(--fish-green);
}

.btn-success:hover {
  background: var(--fish-green-bright);
  border-color: var(--fish-green-bright);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.25);
}

/* Glass button */
.btn-glass {
  background: var(--fish-glass);
  backdrop-filter: blur(var(--fish-glass-blur));
  -webkit-backdrop-filter: blur(var(--fish-glass-blur));
  color: var(--fish-text);
  border-color: var(--fish-glass-border);
}

.btn-glass:hover {
  background: var(--fish-card-hover);
  border-color: var(--fish-card-border-hover);
}

/* Button group */
.btn-group {
  display: inline-flex;
}

.btn-group > .btn {
  border-radius: 0;
}

.btn-group > .btn:first-child {
  border-radius: var(--fish-radius-btn) 0 0 var(--fish-radius-btn);
}

.btn-group > .btn:last-child {
  border-radius: 0 var(--fish-radius-btn) var(--fish-radius-btn) 0;
}

.btn-group > .btn + .btn {
  margin-left: -1px;
}


/* ============================================================
   4. TYPOGRAPHY
   ============================================================ */

.heading-xl {
  font-family: var(--fish-font-display);
  font-size: var(--fish-text-4xl);
  font-weight: var(--fish-weight-black);
  line-height: var(--fish-leading-tight);
  letter-spacing: var(--fish-tracking-tighter);
}

.heading-lg {
  font-family: var(--fish-font-display);
  font-size: var(--fish-text-3xl);
  font-weight: var(--fish-weight-bold);
  line-height: var(--fish-leading-tight);
  letter-spacing: var(--fish-tracking-tight);
}

.heading-md {
  font-family: var(--fish-font-display);
  font-size: var(--fish-text-2xl);
  font-weight: var(--fish-weight-bold);
  line-height: var(--fish-leading-snug);
  letter-spacing: var(--fish-tracking-tight);
}

.heading-sm {
  font-family: var(--fish-font-display);
  font-size: var(--fish-text-xl);
  font-weight: var(--fish-weight-semibold);
  line-height: var(--fish-leading-snug);
}

.heading-xs {
  font-family: var(--fish-font-display);
  font-size: var(--fish-text-lg);
  font-weight: var(--fish-weight-semibold);
  line-height: var(--fish-leading-snug);
}

.body-text {
  font-size: var(--fish-text-base);
  line-height: var(--fish-leading-relaxed);
  color: var(--fish-text);
}

.body-text-sm {
  font-size: var(--fish-text-sm);
  line-height: var(--fish-leading-relaxed);
  color: var(--fish-text);
}

.body-text-lg {
  font-size: var(--fish-text-md);
  line-height: var(--fish-leading-relaxed);
  color: var(--fish-text);
}

.caption {
  font-size: var(--fish-text-xs);
  line-height: var(--fish-leading-normal);
  color: var(--fish-text-muted);
}

.overline {
  font-size: var(--fish-text-xs);
  font-weight: var(--fish-weight-semibold);
  letter-spacing: var(--fish-tracking-widest);
  text-transform: uppercase;
  color: var(--fish-accent);
  line-height: var(--fish-leading-normal);
}

.label {
  font-size: var(--fish-text-sm);
  font-weight: var(--fish-weight-medium);
  color: var(--fish-text-muted);
}

.mono {
  font-family: var(--fish-font-mono);
  font-size: 0.9em;
}

.text-muted  { color: var(--fish-text-muted); }
.text-dim    { color: var(--fish-text-dim); }
.text-accent { color: var(--fish-accent); }
.text-gold   { color: var(--fish-gold); }
.text-green  { color: var(--fish-green); }
.text-red    { color: var(--fish-red); }

.text-center  { text-align: center; }
.text-left    { text-align: left; }
.text-right   { text-align: right; }

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Gradient text */
.text-gradient {
  background: linear-gradient(135deg, var(--fish-accent-bright), var(--fish-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-gold {
  background: linear-gradient(135deg, var(--fish-gold-bright), var(--fish-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}


/* ============================================================
   5. NAVIGATION
   ============================================================ */

.fish-nav {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: var(--fish-nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--fish-space-6);
  background: var(--fish-glass-heavy);
  backdrop-filter: blur(var(--fish-glass-heavy-blur));
  -webkit-backdrop-filter: blur(var(--fish-glass-heavy-blur));
  border-bottom: 1px solid var(--fish-divider);
  z-index: var(--fish-z-nav);
  transition: var(--fish-transition-bg);
}

.fish-nav-brand {
  display: flex;
  align-items: center;
  gap: var(--fish-space-3);
  font-family: var(--fish-font-display);
  font-size: var(--fish-text-lg);
  font-weight: var(--fish-weight-bold);
  color: var(--fish-text);
  text-decoration: none;
}

.fish-nav-brand img,
.fish-nav-brand svg {
  height: 32px;
  width: auto;
}

.fish-nav-links {
  display: flex;
  align-items: center;
  gap: var(--fish-space-1);
}

.fish-nav-item {
  display: inline-flex;
  align-items: center;
  gap: var(--fish-space-1_5);
  padding: var(--fish-space-2) var(--fish-space-3);
  font-size: var(--fish-text-sm);
  font-weight: var(--fish-weight-medium);
  color: var(--fish-text-muted);
  text-decoration: none;
  border-radius: var(--fish-radius-md);
  transition:
    color var(--fish-duration-fast) var(--fish-ease-default),
    background-color var(--fish-duration-fast) var(--fish-ease-default);
}

.fish-nav-item:hover {
  color: var(--fish-text);
  background: var(--fish-card);
}

.fish-nav-item.active,
.fish-nav-item.is-active,
.fish-nav-item[aria-current="page"] {
  color: var(--fish-accent);
  background: var(--fish-accent-ghost);
}

.fish-nav-actions {
  display: flex;
  align-items: center;
  gap: var(--fish-space-2);
}

/* Mobile menu toggle */
.fish-nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--fish-radius-md);
  color: var(--fish-text-muted);
  cursor: pointer;
}

.fish-nav-toggle:hover {
  background: var(--fish-card);
  color: var(--fish-text);
}

/* Mobile drawer */
.fish-nav-drawer {
  display: none;
  position: fixed;
  top: var(--fish-nav-height-mobile);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--fish-bg-overlay);
  backdrop-filter: blur(var(--fish-glass-blur));
  -webkit-backdrop-filter: blur(var(--fish-glass-blur));
  z-index: var(--fish-z-sidebar);
  padding: var(--fish-space-4);
  overflow-y: auto;
  transform: translateY(-10px);
  opacity: 0;
  transition:
    transform var(--fish-duration-normal) var(--fish-ease-out),
    opacity var(--fish-duration-normal) var(--fish-ease-out);
}

.fish-nav-drawer.is-open {
  display: block;
  transform: translateY(0);
  opacity: 1;
}

.fish-nav-drawer .fish-nav-item {
  display: flex;
  width: 100%;
  padding: var(--fish-space-3) var(--fish-space-4);
  font-size: var(--fish-text-base);
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--fish-space-2);
  font-size: var(--fish-text-sm);
  color: var(--fish-text-dim);
}

.breadcrumb-separator {
  color: var(--fish-text-dim);
  user-select: none;
}

.breadcrumb a {
  color: var(--fish-text-muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--fish-accent);
}


/* ============================================================
   6. FORMS
   ============================================================ */

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--fish-space-1_5);
}

.form-label {
  font-size: var(--fish-text-sm);
  font-weight: var(--fish-weight-medium);
  color: var(--fish-text-muted);
}

.form-hint {
  font-size: var(--fish-text-xs);
  color: var(--fish-text-dim);
}

.form-error {
  font-size: var(--fish-text-xs);
  color: var(--fish-red);
}

.input-field,
.select-field,
.textarea-field {
  width: 100%;
  height: var(--fish-input-height);
  padding: 0 var(--fish-space-3);
  font-size: var(--fish-text-sm);
  color: var(--fish-text);
  background: var(--fish-bg-deep);
  border: 1px solid var(--fish-outline);
  border-radius: var(--fish-radius-input);
  outline: none;
  transition:
    border-color var(--fish-duration-fast) var(--fish-ease-default),
    box-shadow var(--fish-duration-fast) var(--fish-ease-default),
    background-color var(--fish-duration-fast) var(--fish-ease-default);
}

.textarea-field {
  height: auto;
  min-height: 100px;
  padding: var(--fish-space-3);
  resize: vertical;
}

.input-field::placeholder,
.textarea-field::placeholder {
  color: var(--fish-text-dim);
}

.input-field:hover,
.select-field:hover,
.textarea-field:hover {
  border-color: var(--fish-text-dim);
}

.input-field:focus,
.select-field:focus,
.textarea-field:focus {
  border-color: var(--fish-accent);
  box-shadow: 0 0 0 3px var(--fish-accent-ghost);
  background: var(--fish-bg);
}

.input-field.is-error,
.select-field.is-error,
.textarea-field.is-error {
  border-color: var(--fish-red);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.input-field.is-success,
.select-field.is-success,
.textarea-field.is-success {
  border-color: var(--fish-green);
}

.input-field:disabled,
.select-field:disabled,
.textarea-field:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--fish-bg-raised);
}

/* Select styling */
.select-field {
  appearance: none;
  padding-right: var(--fish-space-10);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 6l3.5 4 3.5-4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  cursor: pointer;
}

/* Input sizes */
.input-sm,
.select-sm {
  height: var(--fish-btn-height-sm);
  font-size: var(--fish-text-xs);
}

.input-lg,
.select-lg {
  height: var(--fish-btn-height-lg);
  font-size: var(--fish-text-base);
  padding: 0 var(--fish-space-4);
}

/* Search box */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box .input-field {
  padding-left: var(--fish-space-10);
}

.search-box-icon {
  position: absolute;
  left: var(--fish-space-3);
  width: var(--fish-icon-md);
  height: var(--fish-icon-md);
  color: var(--fish-text-dim);
  pointer-events: none;
}

.search-box-clear {
  position: absolute;
  right: var(--fish-space-2);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--fish-radius-full);
  color: var(--fish-text-dim);
  cursor: pointer;
  transition: var(--fish-transition-all);
}

.search-box-clear:hover {
  background: var(--fish-card);
  color: var(--fish-text);
}

/* Checkbox & Radio */
.checkbox-field,
.radio-field {
  display: inline-flex;
  align-items: center;
  gap: var(--fish-space-2);
  cursor: pointer;
  font-size: var(--fish-text-sm);
  color: var(--fish-text);
  user-select: none;
}

.checkbox-field input,
.radio-field input {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--fish-outline);
  background: var(--fish-bg-deep);
  cursor: pointer;
  transition: var(--fish-transition-all);
  flex-shrink: 0;
}

.checkbox-field input {
  border-radius: var(--fish-radius-sm);
}

.radio-field input {
  border-radius: var(--fish-radius-full);
}

.checkbox-field input:checked,
.radio-field input:checked {
  background: var(--fish-accent);
  border-color: var(--fish-accent);
}

.checkbox-field input:checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='white'%3E%3Cpath d='M10 3L4.5 8.5 2 6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px;
}

.radio-field input:checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Ccircle cx='4' cy='4' r='3' fill='white'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

/* Toggle switch */
.toggle-switch {
  display: inline-flex;
  align-items: center;
  gap: var(--fish-space-2);
  cursor: pointer;
  user-select: none;
}

.toggle-switch input {
  appearance: none;
  width: 44px;
  height: 24px;
  background: var(--fish-bg-elevated);
  border: 2px solid var(--fish-outline);
  border-radius: var(--fish-radius-full);
  cursor: pointer;
  position: relative;
  transition: var(--fish-transition-all);
  flex-shrink: 0;
}

.toggle-switch input::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: var(--fish-text-muted);
  border-radius: var(--fish-radius-full);
  transition: var(--fish-transition-transform);
}

.toggle-switch input:checked {
  background: var(--fish-accent);
  border-color: var(--fish-accent);
}

.toggle-switch input:checked::after {
  transform: translateX(20px);
  background: white;
}

/* Input with icon / prefix / suffix */
.input-group {
  display: flex;
  align-items: center;
}

.input-group .input-field {
  border-radius: 0;
}

.input-group .input-field:first-child {
  border-radius: var(--fish-radius-input) 0 0 var(--fish-radius-input);
}

.input-group .input-field:last-child {
  border-radius: 0 var(--fish-radius-input) var(--fish-radius-input) 0;
}

.input-addon {
  height: var(--fish-input-height);
  padding: 0 var(--fish-space-3);
  display: flex;
  align-items: center;
  background: var(--fish-bg-raised);
  border: 1px solid var(--fish-outline);
  font-size: var(--fish-text-sm);
  color: var(--fish-text-muted);
  white-space: nowrap;
}

.input-addon:first-child {
  border-right: none;
  border-radius: var(--fish-radius-input) 0 0 var(--fish-radius-input);
}

.input-addon:last-child {
  border-left: none;
  border-radius: 0 var(--fish-radius-input) var(--fish-radius-input) 0;
}


/* ============================================================
   7. BADGES
   ============================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--fish-space-1);
  padding: var(--fish-space-0_5) var(--fish-space-2);
  font-size: var(--fish-text-2xs);
  font-weight: var(--fish-weight-semibold);
  letter-spacing: var(--fish-tracking-wide);
  text-transform: uppercase;
  border-radius: var(--fish-radius-badge);
  line-height: var(--fish-leading-normal);
  white-space: nowrap;
}

.badge-default {
  background: var(--fish-card);
  color: var(--fish-text-muted);
  border: 1px solid var(--fish-card-border);
}

.badge-accent {
  background: var(--fish-accent-ghost);
  color: var(--fish-accent-bright);
  border: 1px solid rgba(6, 182, 212, 0.15);
}

.badge-gold {
  background: rgba(245, 158, 11, 0.12);
  color: var(--fish-gold-bright);
  border: 1px solid rgba(245, 158, 11, 0.15);
}

.badge-success {
  background: rgba(16, 185, 129, 0.12);
  color: var(--fish-green-bright);
  border: 1px solid rgba(16, 185, 129, 0.15);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.12);
  color: var(--fish-red-bright);
  border: 1px solid rgba(239, 68, 68, 0.15);
}

.badge-warning {
  background: rgba(249, 115, 22, 0.12);
  color: var(--fish-orange);
  border: 1px solid rgba(249, 115, 22, 0.15);
}

.badge-purple {
  background: rgba(139, 92, 246, 0.12);
  color: var(--fish-purple);
  border: 1px solid rgba(139, 92, 246, 0.15);
}

/* Badge sizes */
.badge-lg {
  padding: var(--fish-space-1) var(--fish-space-3);
  font-size: var(--fish-text-xs);
}

/* Badge with dot indicator */
.badge-dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: var(--fish-radius-full);
  background: currentColor;
  flex-shrink: 0;
}

/* Species badge — colored dot + species name */
.species-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--fish-space-1_5);
  padding: var(--fish-space-1) var(--fish-space-3);
  font-size: var(--fish-text-xs);
  font-weight: var(--fish-weight-medium);
  color: var(--fish-text);
  background: var(--fish-card);
  border: 1px solid var(--fish-card-border);
  border-radius: var(--fish-radius-badge);
  white-space: nowrap;
}

.species-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--fish-radius-full);
  flex-shrink: 0;
}

.species-badge[data-species="bass"]    .species-badge-dot { background: #22c55e; }
.species-badge[data-species="trout"]   .species-badge-dot { background: #f43f5e; }
.species-badge[data-species="walleye"] .species-badge-dot { background: #f59e0b; }
.species-badge[data-species="catfish"] .species-badge-dot { background: #a87c4f; }
.species-badge[data-species="crappie"] .species-badge-dot { background: #a78bfa; }
.species-badge[data-species="salmon"]  .species-badge-dot { background: #fb923c; }
.species-badge[data-species="pike"]    .species-badge-dot { background: #64748b; }
.species-badge[data-species="panfish"] .species-badge-dot { background: #84cc16; }
.species-badge[data-species="redfish"] .species-badge-dot { background: #dc2626; }
.species-badge[data-species="tuna"]    .species-badge-dot { background: #2563eb; }

/* Counter badge (notification count) */
.badge-counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  font-size: var(--fish-text-2xs);
  font-weight: var(--fish-weight-bold);
  color: white;
  background: var(--fish-red);
  border-radius: var(--fish-radius-full);
  line-height: 1;
}


/* ============================================================
   8. MODALS
   ============================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--fish-space-4);
  background: rgba(0, 0, 0, 0.60);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: var(--fish-z-modal);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--fish-duration-normal) var(--fish-ease-default),
    visibility var(--fish-duration-normal) var(--fish-ease-default);
}

.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-glass {
  position: relative;
  width: 100%;
  max-width: var(--fish-modal-md);
  max-height: 90vh;
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
  background: var(--fish-glass-heavy);
  backdrop-filter: blur(var(--fish-glass-heavy-blur));
  -webkit-backdrop-filter: blur(var(--fish-glass-heavy-blur));
  border: 1px solid var(--fish-glass-border);
  border-radius: var(--fish-radius-modal);
  box-shadow: var(--fish-shadow-xl);
  transform: scale(0.95) translateY(10px);
  transition: transform var(--fish-duration-normal) var(--fish-ease-spring);
  overflow: hidden;
}

.modal-overlay.is-open .modal-glass {
  transform: scale(1) translateY(0);
}

.modal-sm .modal-glass { max-width: var(--fish-modal-sm); }
.modal-lg .modal-glass { max-width: var(--fish-modal-lg); }
.modal-xl .modal-glass { max-width: var(--fish-modal-xl); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--fish-space-5) var(--fish-space-6);
  border-bottom: 1px solid var(--fish-divider);
  flex-shrink: 0;
}

.modal-title {
  font-family: var(--fish-font-display);
  font-size: var(--fish-text-lg);
  font-weight: var(--fish-weight-semibold);
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--fish-radius-md);
  color: var(--fish-text-dim);
  cursor: pointer;
  transition: var(--fish-transition-all);
}

.modal-close:hover {
  background: var(--fish-card);
  color: var(--fish-text);
}

.modal-body {
  padding: var(--fish-space-6);
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--fish-space-3);
  padding: var(--fish-space-4) var(--fish-space-6);
  border-top: 1px solid var(--fish-divider);
  flex-shrink: 0;
}


/* ============================================================
   9. TOAST NOTIFICATIONS
   ============================================================ */

.toast-container {
  position: fixed;
  top: var(--fish-space-4);
  right: var(--fish-space-4);
  display: flex;
  flex-direction: column;
  gap: var(--fish-space-3);
  z-index: var(--fish-z-toast);
  pointer-events: none;
  max-width: 420px;
  width: calc(100% - var(--fish-space-8));
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: var(--fish-space-3);
  padding: var(--fish-space-4);
  background: var(--fish-bg-elevated);
  border: 1px solid var(--fish-card-border);
  border-radius: var(--fish-radius-lg);
  box-shadow: var(--fish-shadow-lg);
  pointer-events: auto;
  transform: translateX(120%);
  opacity: 0;
  transition:
    transform var(--fish-duration-slow) var(--fish-ease-spring),
    opacity var(--fish-duration-normal) var(--fish-ease-default);
}

.toast.is-visible {
  transform: translateX(0);
  opacity: 1;
}

.toast.is-exiting {
  transform: translateX(120%);
  opacity: 0;
}

.toast-icon {
  width: var(--fish-icon-lg);
  height: var(--fish-icon-lg);
  flex-shrink: 0;
  margin-top: 1px;
}

.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-size: var(--fish-text-sm);
  font-weight: var(--fish-weight-semibold);
  color: var(--fish-text);
  margin-bottom: var(--fish-space-0_5);
}

.toast-message {
  font-size: var(--fish-text-xs);
  color: var(--fish-text-muted);
  line-height: var(--fish-leading-relaxed);
}

.toast-dismiss {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--fish-radius-sm);
  color: var(--fish-text-dim);
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--fish-transition-all);
}

.toast-dismiss:hover {
  background: var(--fish-card);
  color: var(--fish-text);
}

/* Toast variants — left border accent */
.toast-info    { border-left: 3px solid var(--fish-accent); }
.toast-success { border-left: 3px solid var(--fish-green); }
.toast-warning { border-left: 3px solid var(--fish-orange); }
.toast-error   { border-left: 3px solid var(--fish-red); }

.toast-info    .toast-icon { color: var(--fish-accent); }
.toast-success .toast-icon { color: var(--fish-green); }
.toast-warning .toast-icon { color: var(--fish-orange); }
.toast-error   .toast-icon { color: var(--fish-red); }

/* Progress bar for auto-dismiss */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--fish-accent);
  border-radius: 0 0 var(--fish-radius-lg) var(--fish-radius-lg);
  animation: toast-countdown linear forwards;
}

@keyframes toast-countdown {
  from { width: 100%; }
  to   { width: 0; }
}


/* ============================================================
   10. SPECIES SIDEBAR
   ============================================================ */

.species-sidebar {
  position: fixed;
  top: var(--fish-nav-height);
  left: 0;
  bottom: 0;
  width: var(--fish-sidebar-width);
  background: var(--fish-bg-deep);
  border-right: 1px solid var(--fish-divider);
  overflow-y: auto;
  z-index: var(--fish-z-sidebar);
  padding: var(--fish-space-4) var(--fish-space-3);
  display: flex;
  flex-direction: column;
  gap: var(--fish-space-2);
  transition: transform var(--fish-duration-normal) var(--fish-ease-default);
}

.species-sidebar-header {
  padding: var(--fish-space-2) var(--fish-space-2);
  margin-bottom: var(--fish-space-2);
}

.species-sidebar-header .overline {
  margin-bottom: var(--fish-space-1);
}

.species-sidebar-search {
  padding: 0 var(--fish-space-2);
  margin-bottom: var(--fish-space-3);
}

.species-card-mini {
  display: flex;
  align-items: center;
  gap: var(--fish-space-3);
  padding: var(--fish-space-2_5) var(--fish-space-3);
  border-radius: var(--fish-radius-md);
  cursor: pointer;
  transition:
    background-color var(--fish-duration-fast) var(--fish-ease-default),
    border-color var(--fish-duration-fast) var(--fish-ease-default);
  border: 1px solid transparent;
}

.species-card-mini:hover {
  background: var(--fish-card);
  border-color: var(--fish-card-border);
}

.species-card-mini.active,
.species-card-mini.is-active {
  background: var(--fish-accent-ghost);
  border-color: var(--fish-accent-dim);
}

.species-card-mini-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--fish-radius-md);
  background: var(--fish-card);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.species-card-mini-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.species-card-mini-info {
  flex: 1;
  min-width: 0;
}

.species-card-mini-name {
  font-size: var(--fish-text-sm);
  font-weight: var(--fish-weight-medium);
  color: var(--fish-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.species-card-mini-meta {
  font-size: var(--fish-text-2xs);
  color: var(--fish-text-dim);
}

.species-card-mini-count {
  font-size: var(--fish-text-xs);
  font-weight: var(--fish-weight-semibold);
  color: var(--fish-text-muted);
  flex-shrink: 0;
}

/* Collapsed sidebar */
.species-sidebar.is-collapsed {
  width: var(--fish-sidebar-collapsed);
  padding: var(--fish-space-4) var(--fish-space-2);
}

.species-sidebar.is-collapsed .species-card-mini-info,
.species-sidebar.is-collapsed .species-card-mini-count,
.species-sidebar.is-collapsed .species-sidebar-header,
.species-sidebar.is-collapsed .species-sidebar-search {
  display: none;
}

.species-sidebar.is-collapsed .species-card-mini {
  justify-content: center;
  padding: var(--fish-space-2);
}

/* Content offset when sidebar is present */
.has-sidebar {
  margin-left: var(--fish-sidebar-width);
  transition: margin-left var(--fish-duration-normal) var(--fish-ease-default);
}

.has-sidebar.sidebar-collapsed {
  margin-left: var(--fish-sidebar-collapsed);
}


/* ============================================================
   11. STATS DISPLAYS
   ============================================================ */

.stat-block {
  display: flex;
  flex-direction: column;
  gap: var(--fish-space-1);
  padding: var(--fish-space-4);
}

.stat-number {
  font-family: var(--fish-font-display);
  font-size: var(--fish-text-3xl);
  font-weight: var(--fish-weight-bold);
  line-height: var(--fish-leading-none);
  color: var(--fish-text);
  letter-spacing: var(--fish-tracking-tight);
}

.stat-number-sm {
  font-size: var(--fish-text-2xl);
}

.stat-number-lg {
  font-size: var(--fish-text-4xl);
}

.stat-number-accent { color: var(--fish-accent); }
.stat-number-gold   { color: var(--fish-gold); }
.stat-number-green  { color: var(--fish-green); }
.stat-number-red    { color: var(--fish-red); }

.stat-label {
  font-size: var(--fish-text-xs);
  font-weight: var(--fish-weight-medium);
  color: var(--fish-text-muted);
  text-transform: uppercase;
  letter-spacing: var(--fish-tracking-wider);
}

.stat-change {
  display: inline-flex;
  align-items: center;
  gap: var(--fish-space-1);
  font-size: var(--fish-text-xs);
  font-weight: var(--fish-weight-semibold);
}

.stat-change-up   { color: var(--fish-green); }
.stat-change-down { color: var(--fish-red); }
.stat-change-flat { color: var(--fish-text-dim); }

/* Stats row — side-by-side */
.stat-row {
  display: flex;
  gap: var(--fish-space-6);
  flex-wrap: wrap;
}

/* Stats grid */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--fish-space-4);
}

/* Mini stat — inline */
.stat-inline {
  display: inline-flex;
  align-items: baseline;
  gap: var(--fish-space-1_5);
}

.stat-inline-value {
  font-size: var(--fish-text-lg);
  font-weight: var(--fish-weight-bold);
  color: var(--fish-text);
}

.stat-inline-label {
  font-size: var(--fish-text-xs);
  color: var(--fish-text-muted);
}


/* ============================================================
   12. CAROUSEL
   ============================================================ */

.carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--fish-radius-lg);
}

.carousel-track {
  display: flex;
  transition: transform var(--fish-duration-slow) var(--fish-ease-water);
  will-change: transform;
}

.carousel-item {
  flex: 0 0 100%;
  min-width: 0;
}

/* Multi-item carousel */
.carousel-multi .carousel-item {
  flex: 0 0 33.333%;
  padding: 0 var(--fish-space-2);
}

.carousel-controls {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 var(--fish-space-3);
  pointer-events: none;
  z-index: var(--fish-z-raised);
}

.carousel-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--fish-glass-heavy);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--fish-glass-border);
  border-radius: var(--fish-radius-full);
  color: var(--fish-text);
  cursor: pointer;
  pointer-events: auto;
  transition: var(--fish-transition-all);
}

.carousel-btn:hover {
  background: var(--fish-accent-ghost);
  border-color: var(--fish-accent-dim);
  box-shadow: var(--fish-shadow-glow);
}

.carousel-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.carousel-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--fish-space-2);
  padding: var(--fish-space-4) 0;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--fish-radius-full);
  background: var(--fish-text-dim);
  cursor: pointer;
  transition: var(--fish-transition-all);
}

.carousel-dot.active,
.carousel-dot.is-active {
  background: var(--fish-accent);
  width: 24px;
}


/* ============================================================
   13. GLASS HUD PANELS (3D Overlay UI)
   ============================================================ */

.hud-panel {
  position: absolute;
  background: var(--fish-glass);
  backdrop-filter: blur(var(--fish-glass-blur));
  -webkit-backdrop-filter: blur(var(--fish-glass-blur));
  border: 1px solid var(--fish-glass-border);
  border-radius: var(--fish-radius-lg);
  padding: var(--fish-space-4);
  z-index: var(--fish-z-hud);
  box-shadow: var(--fish-shadow-lg);
  color: var(--fish-text);
  pointer-events: auto;
  transition:
    opacity var(--fish-duration-normal) var(--fish-ease-default),
    transform var(--fish-duration-normal) var(--fish-ease-default);
}

.hud-panel.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.95);
}

.hud-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--fish-space-3);
  padding-bottom: var(--fish-space-2);
  border-bottom: 1px solid var(--fish-divider);
}

.hud-panel-title {
  font-size: var(--fish-text-xs);
  font-weight: var(--fish-weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--fish-tracking-wider);
  color: var(--fish-accent);
}

.hud-panel-close {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fish-text-dim);
  cursor: pointer;
  border-radius: var(--fish-radius-sm);
}

.hud-panel-close:hover {
  color: var(--fish-text);
  background: var(--fish-card);
}

/* HUD data row */
.hud-data-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--fish-space-1) 0;
  font-size: var(--fish-text-xs);
}

.hud-data-key {
  color: var(--fish-text-muted);
}

.hud-data-value {
  color: var(--fish-text);
  font-weight: var(--fish-weight-semibold);
  font-family: var(--fish-font-mono);
}

/* HUD meter bar */
.hud-meter {
  width: 100%;
  height: 4px;
  background: var(--fish-bg-deep);
  border-radius: var(--fish-radius-full);
  overflow: hidden;
  margin: var(--fish-space-1) 0;
}

.hud-meter-fill {
  height: 100%;
  background: var(--fish-accent);
  border-radius: var(--fish-radius-full);
  transition: width var(--fish-duration-slow) var(--fish-ease-water);
}

.hud-meter-fill.is-warning { background: var(--fish-orange); }
.hud-meter-fill.is-danger  { background: var(--fish-red); }
.hud-meter-fill.is-success { background: var(--fish-green); }

/* HUD positions */
.hud-top-left     { top: var(--fish-space-4); left: var(--fish-space-4); }
.hud-top-right    { top: var(--fish-space-4); right: var(--fish-space-4); }
.hud-bottom-left  { bottom: var(--fish-space-4); left: var(--fish-space-4); }
.hud-bottom-right { bottom: var(--fish-space-4); right: var(--fish-space-4); }
.hud-center       { top: 50%; left: 50%; transform: translate(-50%, -50%); }


/* ============================================================
   14. LOADING STATES
   ============================================================ */

/* Skeleton loader */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--fish-card) 25%,
    var(--fish-card-hover) 50%,
    var(--fish-card) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer var(--fish-duration-glacial) var(--fish-ease-in-out) infinite;
  border-radius: var(--fish-radius-md);
}

.skeleton-text {
  height: 1em;
  margin-bottom: var(--fish-space-2);
  border-radius: var(--fish-radius-sm);
}

.skeleton-text:last-child {
  width: 75%;
}

.skeleton-circle {
  border-radius: var(--fish-radius-full);
}

.skeleton-card {
  height: 200px;
}

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--fish-radius-full);
}

.skeleton-btn {
  height: var(--fish-btn-height);
  width: 120px;
}

@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Spinner */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--fish-card-border);
  border-top-color: var(--fish-accent);
  border-radius: var(--fish-radius-full);
  animation: spinner-rotate 0.8s linear infinite;
}

.spinner-sm {
  width: 16px;
  height: 16px;
  border-width: 2px;
}

.spinner-lg {
  width: 40px;
  height: 40px;
  border-width: 4px;
}

.spinner-xl {
  width: 56px;
  height: 56px;
  border-width: 4px;
}

@keyframes spinner-rotate {
  to { transform: rotate(360deg); }
}

/* Dot loader (three bouncing dots) */
.dot-loader {
  display: inline-flex;
  gap: var(--fish-space-1);
  align-items: center;
}

.dot-loader-dot {
  width: 6px;
  height: 6px;
  background: var(--fish-accent);
  border-radius: var(--fish-radius-full);
  animation: dot-bounce 1.4s var(--fish-ease-in-out) infinite;
}

.dot-loader-dot:nth-child(2) { animation-delay: 0.16s; }
.dot-loader-dot:nth-child(3) { animation-delay: 0.32s; }

@keyframes dot-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40%           { transform: scale(1);   opacity: 1; }
}

/* Full-page loader */
.page-loader {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--fish-space-4);
  background: var(--fish-bg);
  z-index: var(--fish-z-max);
  transition: opacity var(--fish-duration-slow) var(--fish-ease-default);
}

.page-loader.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.page-loader-text {
  font-size: var(--fish-text-sm);
  color: var(--fish-text-muted);
  animation: pulse-text 2s var(--fish-ease-in-out) infinite;
}

@keyframes pulse-text {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 1; }
}


/* ============================================================
   15. TABLES
   ============================================================ */

.fish-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fish-text-sm);
}

.fish-table thead {
  border-bottom: 1px solid var(--fish-divider);
}

.fish-table th {
  text-align: left;
  padding: var(--fish-space-3) var(--fish-space-4);
  font-size: var(--fish-text-xs);
  font-weight: var(--fish-weight-semibold);
  color: var(--fish-text-muted);
  text-transform: uppercase;
  letter-spacing: var(--fish-tracking-wider);
  white-space: nowrap;
}

.fish-table td {
  padding: var(--fish-space-3) var(--fish-space-4);
  color: var(--fish-text);
  border-bottom: 1px solid var(--fish-divider);
}

.fish-table tbody tr {
  transition: background-color var(--fish-duration-fast) var(--fish-ease-default);
}

.fish-table tbody tr:hover {
  background: var(--fish-card);
}

.fish-table-striped tbody tr:nth-child(even) {
  background: var(--fish-card);
}

.fish-table-compact th,
.fish-table-compact td {
  padding: var(--fish-space-2) var(--fish-space-3);
}

/* Responsive table wrapper */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--fish-card-border);
  border-radius: var(--fish-radius-card);
}

.table-responsive .fish-table {
  margin: 0;
}


/* ============================================================
   16. TABS
   ============================================================ */

.tab-list {
  display: flex;
  gap: var(--fish-space-1);
  border-bottom: 1px solid var(--fish-divider);
  overflow-x: auto;
  scrollbar-width: none;
}

.tab-list::-webkit-scrollbar {
  display: none;
}

.tab-item {
  display: inline-flex;
  align-items: center;
  gap: var(--fish-space-1_5);
  padding: var(--fish-space-3) var(--fish-space-4);
  font-size: var(--fish-text-sm);
  font-weight: var(--fish-weight-medium);
  color: var(--fish-text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition:
    color var(--fish-duration-fast) var(--fish-ease-default),
    border-color var(--fish-duration-fast) var(--fish-ease-default);
  margin-bottom: -1px;
}

.tab-item:hover {
  color: var(--fish-text);
}

.tab-item.active,
.tab-item.is-active,
.tab-item[aria-selected="true"] {
  color: var(--fish-accent);
  border-bottom-color: var(--fish-accent);
}

.tab-panel {
  padding: var(--fish-space-5) 0;
}

.tab-panel[hidden] {
  display: none;
}

/* Pill tabs (alternative style) */
.tab-list-pills {
  display: flex;
  gap: var(--fish-space-1);
  border-bottom: none;
  background: var(--fish-card);
  padding: var(--fish-space-1);
  border-radius: var(--fish-radius-lg);
  width: fit-content;
}

.tab-list-pills .tab-item {
  border-bottom: none;
  border-radius: var(--fish-radius-md);
  padding: var(--fish-space-2) var(--fish-space-4);
  margin-bottom: 0;
}

.tab-list-pills .tab-item.active,
.tab-list-pills .tab-item.is-active {
  background: var(--fish-accent);
  color: var(--fish-text-inverse);
}


/* ============================================================
   17. TOOLTIPS & POPOVERS
   ============================================================ */

[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: var(--fish-space-1_5) var(--fish-space-3);
  font-size: var(--fish-text-xs);
  font-weight: var(--fish-weight-medium);
  color: var(--fish-text);
  background: var(--fish-bg-elevated);
  border: 1px solid var(--fish-card-border);
  border-radius: var(--fish-radius-md);
  box-shadow: var(--fish-shadow-md);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  z-index: var(--fish-z-tooltip);
  transition:
    opacity var(--fish-duration-fast) var(--fish-ease-default),
    transform var(--fish-duration-fast) var(--fish-ease-default);
}

[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Tooltip positions */
[data-tooltip-pos="bottom"]::after {
  bottom: auto;
  top: calc(100% + 8px);
}

[data-tooltip-pos="left"]::after {
  bottom: auto;
  top: 50%;
  left: auto;
  right: calc(100% + 8px);
  transform: translateY(-50%) translateX(4px);
}

[data-tooltip-pos="left"]:hover::after {
  transform: translateY(-50%) translateX(0);
}

[data-tooltip-pos="right"]::after {
  bottom: auto;
  top: 50%;
  left: calc(100% + 8px);
  transform: translateY(-50%) translateX(-4px);
}

[data-tooltip-pos="right"]:hover::after {
  transform: translateY(-50%) translateX(0);
}


/* ============================================================
   18. PROGRESS BAR
   ============================================================ */

.progress {
  width: 100%;
  height: 8px;
  background: var(--fish-bg-deep);
  border-radius: var(--fish-radius-full);
  overflow: hidden;
}

.progress-sm { height: 4px; }
.progress-lg { height: 12px; }

.progress-fill {
  height: 100%;
  background: var(--fish-accent);
  border-radius: var(--fish-radius-full);
  transition: width var(--fish-duration-slow) var(--fish-ease-water);
}

.progress-fill-gold    { background: var(--fish-gold); }
.progress-fill-green   { background: var(--fish-green); }
.progress-fill-red     { background: var(--fish-red); }

.progress-fill-gradient {
  background: linear-gradient(90deg, var(--fish-accent-dim), var(--fish-accent-bright));
}

/* Progress with label */
.progress-labeled {
  display: flex;
  align-items: center;
  gap: var(--fish-space-3);
}

.progress-labeled .progress {
  flex: 1;
}

.progress-labeled-value {
  font-size: var(--fish-text-xs);
  font-weight: var(--fish-weight-semibold);
  color: var(--fish-text-muted);
  min-width: 40px;
  text-align: right;
  font-family: var(--fish-font-mono);
}


/* ============================================================
   19. AVATAR
   ============================================================ */

.avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--fish-radius-full);
  background: var(--fish-accent-ghost);
  color: var(--fish-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--fish-weight-semibold);
  font-size: var(--fish-text-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-xs { width: 24px; height: 24px; font-size: var(--fish-text-2xs); }
.avatar-sm { width: 32px; height: 32px; font-size: var(--fish-text-xs); }
.avatar-lg { width: 56px; height: 56px; font-size: var(--fish-text-lg); }
.avatar-xl { width: 80px; height: 80px; font-size: var(--fish-text-2xl); }

.avatar-group {
  display: flex;
}

.avatar-group .avatar {
  border: 2px solid var(--fish-bg);
  margin-left: -8px;
}

.avatar-group .avatar:first-child {
  margin-left: 0;
}


/* ============================================================
   20. CHIP / TAG
   ============================================================ */

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--fish-space-1);
  padding: var(--fish-space-1) var(--fish-space-3);
  font-size: var(--fish-text-xs);
  font-weight: var(--fish-weight-medium);
  color: var(--fish-text);
  background: var(--fish-card);
  border: 1px solid var(--fish-card-border);
  border-radius: var(--fish-radius-full);
  cursor: default;
  white-space: nowrap;
  transition: var(--fish-transition-all);
}

.chip-interactive {
  cursor: pointer;
}

.chip-interactive:hover {
  background: var(--fish-card-hover);
  border-color: var(--fish-card-border-hover);
}

.chip-active,
.chip.is-active {
  background: var(--fish-accent-ghost);
  border-color: var(--fish-accent-dim);
  color: var(--fish-accent-bright);
}

.chip-remove {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--fish-radius-full);
  color: var(--fish-text-dim);
  cursor: pointer;
  margin-left: var(--fish-space-0_5);
  transition: var(--fish-transition-all);
}

.chip-remove:hover {
  background: var(--fish-red);
  color: white;
}


/* ============================================================
   21. UTILITY CLASSES
   ============================================================ */

/* Visibility */
.hidden   { display: none !important; }
.visible  { visibility: visible; }
.invisible { visibility: hidden; }
.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;
}

/* Overflow */
.overflow-hidden  { overflow: hidden; }
.overflow-auto    { overflow: auto; }
.overflow-x-auto  { overflow-x: auto; }
.overflow-y-auto  { overflow-y: auto; }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed    { position: fixed; }
.sticky   { position: sticky; }
.inset-0  { inset: 0; }

/* Sizing */
.w-full  { width: 100%; }
.h-full  { height: 100%; }
.w-screen { width: 100vw; }
.h-screen { height: 100vh; height: 100dvh; }
.min-h-screen { min-height: 100vh; min-height: 100dvh; }
.max-w-full { max-width: 100%; }

/* Spacing helpers */
.m-auto  { margin: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }
.my-auto { margin-top: auto; margin-bottom: auto; }

.p-0  { padding: 0; }
.p-2  { padding: var(--fish-space-2); }
.p-3  { padding: var(--fish-space-3); }
.p-4  { padding: var(--fish-space-4); }
.p-5  { padding: var(--fish-space-5); }
.p-6  { padding: var(--fish-space-6); }
.p-8  { padding: var(--fish-space-8); }

.px-2 { padding-left: var(--fish-space-2); padding-right: var(--fish-space-2); }
.px-3 { padding-left: var(--fish-space-3); padding-right: var(--fish-space-3); }
.px-4 { padding-left: var(--fish-space-4); padding-right: var(--fish-space-4); }
.px-6 { padding-left: var(--fish-space-6); padding-right: var(--fish-space-6); }
.px-8 { padding-left: var(--fish-space-8); padding-right: var(--fish-space-8); }

.py-2 { padding-top: var(--fish-space-2); padding-bottom: var(--fish-space-2); }
.py-3 { padding-top: var(--fish-space-3); padding-bottom: var(--fish-space-3); }
.py-4 { padding-top: var(--fish-space-4); padding-bottom: var(--fish-space-4); }
.py-6 { padding-top: var(--fish-space-6); padding-bottom: var(--fish-space-6); }
.py-8 { padding-top: var(--fish-space-8); padding-bottom: var(--fish-space-8); }

.mt-0  { margin-top: 0; }
.mt-2  { margin-top: var(--fish-space-2); }
.mt-4  { margin-top: var(--fish-space-4); }
.mt-6  { margin-top: var(--fish-space-6); }
.mt-8  { margin-top: var(--fish-space-8); }
.mt-12 { margin-top: var(--fish-space-12); }

.mb-0  { margin-bottom: 0; }
.mb-2  { margin-bottom: var(--fish-space-2); }
.mb-4  { margin-bottom: var(--fish-space-4); }
.mb-6  { margin-bottom: var(--fish-space-6); }
.mb-8  { margin-bottom: var(--fish-space-8); }
.mb-12 { margin-bottom: var(--fish-space-12); }

/* Borders */
.border      { border: 1px solid var(--fish-card-border); }
.border-t    { border-top: 1px solid var(--fish-divider); }
.border-b    { border-bottom: 1px solid var(--fish-divider); }
.border-none { border: none; }

.rounded-sm   { border-radius: var(--fish-radius-sm); }
.rounded-md   { border-radius: var(--fish-radius-md); }
.rounded-lg   { border-radius: var(--fish-radius-lg); }
.rounded-xl   { border-radius: var(--fish-radius-xl); }
.rounded-full { border-radius: var(--fish-radius-full); }

/* Shadows */
.shadow-sm  { box-shadow: var(--fish-shadow-sm); }
.shadow-md  { box-shadow: var(--fish-shadow-md); }
.shadow-lg  { box-shadow: var(--fish-shadow-lg); }
.shadow-xl  { box-shadow: var(--fish-shadow-xl); }
.shadow-glow { box-shadow: var(--fish-shadow-glow); }

/* Opacity */
.opacity-0   { opacity: 0; }
.opacity-25  { opacity: 0.25; }
.opacity-50  { opacity: 0.5; }
.opacity-75  { opacity: 0.75; }
.opacity-100 { opacity: 1; }

/* Cursor */
.cursor-pointer  { cursor: pointer; }
.cursor-default  { cursor: default; }
.cursor-grab     { cursor: grab; }
.cursor-grabbing { cursor: grabbing; }
.pointer-events-none { pointer-events: none; }

/* User select */
.select-none { user-select: none; }
.select-text { user-select: text; }
.select-all  { user-select: all; }


/* ============================================================
   22. AQUATIC EFFECTS
   ============================================================ */

/* Caustics overlay (apply to a pseudo-element) */
.caustics::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 100px 80px at 20% 30%, rgba(6,182,212,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 80px 120px at 70% 60%, rgba(6,182,212,0.04) 0%, transparent 70%),
    radial-gradient(ellipse 120px 60px at 50% 80%, rgba(6,182,212,0.05) 0%, transparent 70%);
  pointer-events: none;
  opacity: var(--fish-caustics-opacity);
  animation: caustics-drift var(--fish-current-speed) var(--fish-ease-water) infinite alternate;
  z-index: 0;
}

@keyframes caustics-drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(15px, -8px) scale(1.05); }
  100% { transform: translate(-10px, 5px) scale(0.98); }
}

/* Gentle wave border — top of a section */
.wave-border-top {
  position: relative;
  overflow: hidden;
}

.wave-border-top::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -5%;
  width: 110%;
  height: 20px;
  background: var(--fish-bg);
  border-radius: 0 0 50% 50%;
  z-index: 1;
}

/* Depth gradient background */
.depth-bg {
  background: var(--fish-depth-gradient);
}

/* Surface shimmer on hover */
.shimmer-hover {
  position: relative;
  overflow: hidden;
}

.shimmer-hover::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: var(--fish-surface-shimmer);
  transform: rotate(25deg) translateX(-100%);
  transition: transform var(--fish-duration-slower) var(--fish-ease-water);
  pointer-events: none;
}

.shimmer-hover:hover::after {
  transform: rotate(25deg) translateX(20%);
}

/* Glow ring on focus/active */
.glow-ring {
  box-shadow: var(--fish-shadow-glow);
}

.glow-ring-lg {
  box-shadow: var(--fish-shadow-glow-lg);
}


/* ============================================================
   23. RESPONSIVE MEDIA QUERIES — Mobile-First
   ============================================================ */

/* Small phones (up to 479px — default styles) */

/* Phones landscape and up (480px) */
@media (min-width: 480px) {
  .container {
    padding-left: var(--fish-space-6);
    padding-right: var(--fish-space-6);
  }

  .heading-xl { font-size: var(--fish-text-5xl); }
}

/* Tablets (768px) */
@media (min-width: 768px) {
  .container {
    padding-left: var(--fish-space-8);
    padding-right: var(--fish-space-8);
  }

  /* Responsive grid columns */
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .md\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

  .md\:col-span-2 { grid-column: span 2 / span 2; }
  .md\:col-span-3 { grid-column: span 3 / span 3; }
  .md\:col-span-4 { grid-column: span 4 / span 4; }
  .md\:col-span-6 { grid-column: span 6 / span 6; }

  .md\:flex-row { flex-direction: row; }
  .md\:hidden   { display: none; }
  .md\:block    { display: block; }
  .md\:flex     { display: flex; }

  .heading-xl { font-size: var(--fish-text-5xl); }
  .heading-lg { font-size: var(--fish-text-4xl); }

  .section    { padding: var(--fish-space-16) 0; }
  .section-lg { padding: var(--fish-space-24) 0; }

  /* Multi-item carousel shows 2 */
  .carousel-multi .carousel-item {
    flex: 0 0 50%;
  }
}

/* Laptops (1024px) */
@media (min-width: 1024px) {
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .lg\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

  .lg\:col-span-2 { grid-column: span 2 / span 2; }
  .lg\:col-span-3 { grid-column: span 3 / span 3; }
  .lg\:col-span-4 { grid-column: span 4 / span 4; }
  .lg\:col-span-8 { grid-column: span 8 / span 8; }
  .lg\:col-span-9 { grid-column: span 9 / span 9; }

  .lg\:flex-row { flex-direction: row; }
  .lg\:hidden   { display: none; }
  .lg\:block    { display: block; }
  .lg\:flex     { display: flex; }

  .heading-xl { font-size: var(--fish-text-6xl); }

  /* Multi-item carousel shows 3 */
  .carousel-multi .carousel-item {
    flex: 0 0 33.333%;
  }

  /* Show sidebar, hide toggle */
  .fish-nav-links { display: flex; }
  .fish-nav-toggle { display: none; }
}

/* Desktops (1280px) */
@media (min-width: 1280px) {
  .xl\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .xl\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .xl\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .xl\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

  .xl\:col-span-3 { grid-column: span 3 / span 3; }
  .xl\:col-span-4 { grid-column: span 4 / span 4; }

  .xl\:hidden { display: none; }
  .xl\:block  { display: block; }
  .xl\:flex   { display: flex; }

  /* Multi-item carousel shows 4 */
  .carousel-multi .carousel-item {
    flex: 0 0 25%;
  }
}

/* Wide screens (1536px) */
@media (min-width: 1536px) {
  .xxl\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .xxl\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .xxl\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* Mobile-specific overrides (max-width) */
@media (max-width: 1023px) {
  .fish-nav-links {
    display: none;
  }

  .fish-nav-toggle {
    display: flex;
  }

  .fish-nav {
    height: var(--fish-nav-height-mobile);
  }

  .page-content {
    padding-top: var(--fish-nav-height-mobile);
  }

  /* Sidebar becomes off-screen drawer on mobile */
  .species-sidebar {
    transform: translateX(-100%);
    z-index: var(--fish-z-sidebar);
  }

  .species-sidebar.is-open {
    transform: translateX(0);
    box-shadow: var(--fish-shadow-xl);
  }

  .has-sidebar {
    margin-left: 0;
  }

  /* With-sidebar stacks vertically */
  .with-sidebar {
    flex-direction: column;
  }

  .with-sidebar > :last-child {
    flex-basis: auto;
  }
}

/* Small phones */
@media (max-width: 479px) {
  .heading-xl { font-size: var(--fish-text-3xl); }
  .heading-lg { font-size: var(--fish-text-2xl); }
  .heading-md { font-size: var(--fish-text-xl); }

  .modal-glass {
    max-height: 100vh;
    max-height: 100dvh;
    border-radius: 0;
  }

  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .toast-container {
    left: var(--fish-space-2);
    right: var(--fish-space-2);
    max-width: none;
    width: auto;
  }
}

/* Landscape phones */
@media (max-height: 500px) and (orientation: landscape) {
  .fish-nav {
    height: 48px;
  }

  .page-content {
    padding-top: 48px;
  }
}


/* ============================================================
   24. PRINT STYLES
   ============================================================ */

@media print {
  *,
  *::before,
  *::after {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
  }

  a { text-decoration: underline; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; }

  .fish-nav,
  .species-sidebar,
  .toast-container,
  .modal-overlay,
  .hud-panel,
  .btn,
  .carousel-controls,
  .carousel-dots,
  .fish-nav-toggle,
  .page-loader {
    display: none !important;
  }

  .has-sidebar { margin-left: 0 !important; }
  .page-content { padding-top: 0 !important; }

  .fish-card,
  .fish-card-glass,
  .fish-card-glass-heavy,
  .fish-card-raised {
    border: 1px solid #ccc !important;
    page-break-inside: avoid;
  }
}
