:root {
  --bg: #f1f5f9;
  --navy: #082f49;
  --card: #ffffff;
  --primary: #0284c7;
  --primary-dark: #0369a1;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --good: #16a34a;
  --warn: #d97706;
  --bad: #dc2626;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 16px;
}
.container { max-width: 680px; margin: 0 auto; padding: 0 14px; }

/* STICKY TOP NAVBAR */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #082f49;
  color: #ffffff;
  padding: 10px 0;
  border-bottom: 1px solid rgba(56, 189, 248, 0.2);
  box-shadow: 0 2px 10px rgba(8, 47, 73, 0.2);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.brand-link {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: #ffffff;
}
.site-logo { width: 34px; height: 34px; flex-shrink: 0; }
.brand-name { font-weight: 800; font-size: 0.98rem; letter-spacing: -0.01em; }
.brand-dot { color: #38bdf8; }

.unit-toggle {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 3px;
  flex-shrink: 0;
}
.unit-toggle button {
  border: none;
  background: transparent;
  padding: 6px 10px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
  color: #e0f2fe;
  transition: 0.2s;
}
.unit-toggle button.active {
  background: #ffffff;
  color: var(--navy);
}

/* HERO SUB-BANNER */
.hero-sub {
  background: linear-gradient(135deg, #0c4a6e 0%, #0e7490 100%);
  color: #ffffff;
  padding: 18px 0 20px;
  margin-bottom: 16px;
}
.hero-sub h1 { font-size: 1.3rem; font-weight: 700; line-height: 1.25; }
.hero-sub p { color: #bae6fd; font-size: 0.85rem; margin-top: 3px; }
/* CARDS & INPUTS */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.step-badge {
  background: #e0f2fe;
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.82rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.card h2 { font-size: 1.08rem; font-weight: 700; }

.dim-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sub-grid .full-span { grid-column: 1 / -1; }
.stock-controls { display: grid; grid-template-columns: 1fr 86px; gap: 10px; margin-top: 12px; }
.stock-controls .btn-add { grid-column: 1 / -1; }

@media (min-width: 600px) {
  .brand-name { font-size: 1.12rem; }
  .sub-grid { grid-template-columns: 1fr 1.3fr 1.3fr; }
  .sub-grid .full-span { grid-column: auto; }
  .stock-controls { grid-template-columns: 1fr 86px 140px; align-items: end; }
  .stock-controls .btn-add { grid-column: auto; }
}

label { display: block; font-size: 0.78rem; font-weight: 600; margin-bottom: 5px; color: var(--muted); }
input, select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
  background-color: #f8fafc;
  color: var(--text);
}
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 38px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://w3.org' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%230284c7' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
}
input:focus, select:focus { outline: none; border-color: var(--primary); background-color: #ffffff; }
.btn-add {
  height: 48px;
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}
.result-box { margin-top: 14px; padding: 14px; background: #f0f9ff; border-radius: 12px; border: 1px solid #bae6fd; }
.result-big { font-size: 1.15rem; font-weight: 700; color: var(--primary-dark); }
.muted-small { font-size: 0.85rem; color: var(--muted); margin-top: 2px; }
.compat-note { font-size: 0.86rem; margin-top: 8px; line-height: 1.45; }
.bold-line { font-weight: 600; font-size: 0.95rem; }
.mt-4 { margin-top: 6px; }
.status-good { color: var(--good); }
.status-warn { color: var(--warn); }
.status-bad { color: var(--bad); }

.stock-bar-header { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.badge-pill { font-size: 0.75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #e0f2fe; color: var(--primary-dark); }
.progress-track { width: 100%; height: 14px; background: #dbeafe; border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #0ea5e9, #16a34a); border-radius: 999px; transition: width 0.45s ease; }
.progress-fill.bar-warn { background: linear-gradient(90deg, #f59e0b, #d97706); }
.progress-fill.bar-bad { background: linear-gradient(90deg, #ef4444, #dc2626); }

@keyframes pulseBar {
  0% { transform: scaleY(1); filter: brightness(1); }
  50% { transform: scaleY(1.22); filter: brightness(1.25); }
  100% { transform: scaleY(1); filter: brightness(1); }
}
.pulse-active { animation: pulseBar 0.6s ease-out; }

.fish-list { margin-top: 12px; }
.fish-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; font-size: 0.88rem; }
.btn-remove { background: #fee2e2; color: var(--bad); border: none; padding: 7px 12px; border-radius: 8px; cursor: pointer; font-size: 0.8rem; font-weight: 700; }

.ad-slot { text-align: center; padding: 11px 14px; border: 1.5px dashed #bae6fd; background: #ffffff; border-radius: 12px; margin-bottom: 16px; }
.ad-link { display: inline-flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; text-decoration: none; color: var(--muted); font-size: 0.84rem; }
.ad-link strong { color: var(--primary-dark); }
.ad-badge { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.05em; background: #e0f2fe; color: var(--primary-dark); padding: 2px 7px; border-radius: 5px; }

footer { margin-top: 28px; padding: 20px 0 36px; border-top: 1px solid #cbd5e1; font-size: 0.8rem; color: var(--muted); }
footer h3 { font-size: 0.88rem; color: var(--text); margin: 12px 0 4px; }
footer ul { padding-left: 18px; margin-bottom: 8px; }
footer a { color: var(--primary-dark); text-decoration: none; }
