.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--card);
  color: var(--text);
  border: 1.5px solid var(--border);
  min-height: 42px;
  padding: 7px 13px;
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s ease, border-color 0.15s ease, background-color 0.15s ease;
  text-decoration: none;
  user-select: none;
}
.btn:hover { border-color: var(--accent); }
.btn:active { transform: scale(0.98); }
.btn-accent { background: var(--accent-strong); border-color: var(--accent); color: #ffffff; }
.btn-good { background: var(--good); border-color: var(--good); color: #ffffff; }
.btn-install { border-color: var(--good); color: var(--good); display: none; }
.btn-install:hover { background: var(--pill-good-bg); border-color: var(--good); }

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(265px, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.guide-block {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 12px 13px;
  font-size: var(--fs-xs);
  line-height: 1.50;
}
.guide-block h4 {
  font-size: var(--fs-xs);
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.btn-sm {
  min-height: 36px;
  padding: 5px 11px;
  font-size: var(--fs-xs);
  border-radius: 7px;
}
.btn-icon {
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  border-radius: var(--r-sm);
}

.w-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  background: var(--card);
  border: 1px solid var(--border);
  font-size: var(--fs-xs);
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.w-chip:hover { border-color: var(--accent); }
.w-chip.active { background: var(--accent-strong); border-color: var(--accent); color: #ffffff; }

.chip-scroll-row {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.toolbar-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: 700;
  border: 1px solid transparent;
  line-height: 1.25;
  white-space: normal;
  word-break: break-word;
  max-width: 100%;
}
.pill-good { background: var(--pill-good-bg); color: var(--pill-good-text); border-color: rgba(16,185,129,0.35); }
.pill-warn { background: var(--pill-warn-bg); color: var(--pill-warn-text); border-color: rgba(245,158,11,0.35); }
.pill-bad { background: var(--pill-bad-bg); color: var(--pill-bad-text); border-color: rgba(239,68,68,0.40); }
.pill-purple { background: var(--pill-purple-bg); color: var(--pill-purple-text); border-color: rgba(168,85,247,0.35); }
.pill-ice { background: var(--pill-ice-bg); color: var(--pill-ice-text); border-color: rgba(103,232,249,0.40); }
.pill-neutral { background: var(--card); color: var(--muted); border-color: var(--border); }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
  box-shadow: var(--shadow-card);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.section-title {
  font-size: var(--fs-sm);
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.input, select {
  width: 100%;
  min-height: 40px;
  background: var(--input-bg);
  color: var(--text);
  border: 1.5px solid var(--border);
  padding: 7px 11px;
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
}

.fish-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 8px 2px;
  scrollbar-width: thin;
}
.fish-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  background: var(--chip-bg);
  border: 1.5px solid var(--chip-border);
  border-radius: var(--r-md);
  padding: 10px 9px;
  min-width: 168px;
  max-width: 182px;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  text-align: center;
  transition: border-color 0.15s ease, transform 0.15s ease, height 0.14s ease, padding 0.14s ease, min-width 0.14s ease;
}
.fish-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.fish-card.active {
  border-color: var(--accent);
  background: rgba(56, 189, 248, 0.12);
  box-shadow: 0 0 0 2px var(--accent);
}
.fish-card.redbook-muted {
  opacity: 0.88;
  border-style: dashed;
  border-color: var(--bad);
}
.fav-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-pill);
}
.fish-img-wrap {
  width: 118px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
  overflow: hidden;
  flex-shrink: 0;
  transition: width 0.14s ease, height 0.14s ease, margin-top 0.14s ease;
}
.fish-img-wrap svg,
.fish-img-wrap img,
.fish-visual-img,
.fish-visual-svg {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

/* Ревизия 2.0.13 (Пункт 1a, 1b): Крупная витрина рыбы в модальном окне «Подробнее» и смещённые вниз названия */
.fish-detail-header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px;
}
.fish-detail-img-banner {
  width: 100%;
  height: 156px;
  min-height: 142px;
  max-height: 168px;
  background: var(--panel);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px 14px 24px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  cursor: zoom-in;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.fish-detail-img-banner:hover {
  border-color: var(--accent);
}
.fish-detail-img-banner img,
.fish-detail-img-banner svg {
  width: 100% !important;
  height: 100% !important;
  max-width: 310px !important;
  max-height: 118px !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 auto !important;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.48));
}
.fish-detail-zoom-hint {
  position: absolute;
  bottom: 5px;
  right: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 2px 8px;
  pointer-events: none;
}
[data-theme="light"] .fish-detail-zoom-hint {
  background: rgba(255, 255, 255, 0.88);
}
.fish-detail-title-col {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.fish-detail-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  font-size: var(--fs-sm);
}
@media (max-width: 440px) {
  .fish-detail-stats-grid {
    grid-template-columns: 1fr;
  }
}

/* Ревизия 2.0.13 (Пункт 1d): Полноразмерный лайтбокс рыбы (50vw на ПК, по экрану на смартфоне) */
.fish-lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.88);
  z-index: 9500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 14px;
}
.fish-lightbox-backdrop.open {
  display: flex;
}
.fish-lightbox-box {
  background: var(--panel);
  border: 1.5px solid var(--accent);
  border-radius: var(--r-md);
  padding: 16px;
  box-shadow: var(--shadow-header);
  width: 94vw;
  max-width: 94vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
@media (min-width: 769px) {
  .fish-lightbox-box {
    width: 50vw;
    max-width: 50vw;
  }
}
.fish-lightbox-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.fish-lightbox-stage {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 18px;
  min-height: 220px;
  max-height: 68vh;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  overflow: hidden;
}
.fish-lightbox-stage img,
.fish-lightbox-stage svg {
  width: 100% !important;
  height: auto !important;
  max-height: 60vh !important;
  object-fit: contain !important;
  display: block !important;
  filter: drop-shadow(0 6px 16px rgba(0,0,0,0.55));
}

.fish-name {
  font-size: var(--fs-sm);
  font-weight: 800;
  color: var(--text);
  margin-top: 4px;
  line-height: 1.24;
}
.fish-latin {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 3px;
}
.fish-rating-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-top: 3px;
}
.fish-rating-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.factor-row {
  display: grid;
  grid-template-columns: 175px 1fr 56px;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border);
  font-size: var(--fs-sm);
}
.factor-bar-track {
  height: 10px;
  background: var(--input-bg);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.factor-bar-fill {
  height: 100%;
  border-radius: var(--r-pill);
}

.bite-timeline {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.hour-slot {
  flex: 0 0 42px;
  min-width: 42px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  padding: 6px 2px;
  border-radius: var(--r-sm);
  background: var(--card);
  border: 1.5px solid var(--border);
  cursor: pointer;
  font-size: var(--fs-xs);
}
.hour-slot.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.hour-slot.now { border-color: var(--good); }
.hour-bar-wrap {
  width: 12px;
  height: 36px;
  background: var(--input-bg);
  border-radius: 6px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hour-bar { width: 100%; border-radius: 6px; }

.toast-container {
  position: fixed;
  bottom: 82px;
  right: 14px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 340px;
}
.toast {
  background: var(--panel);
  color: var(--text);
  border: 1.5px solid var(--accent);
  border-radius: var(--r-md);
  padding: 10px 13px;
  font-size: var(--fs-sm);
  font-weight: 700;
  box-shadow: var(--shadow-header);
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.80);
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
.modal-backdrop.open { display: flex; }
.modal-box {
  background: var(--panel);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 16px;
  box-shadow: var(--shadow-header);
  position: relative;
}
.modal-box.modal-has-sticky-footer {
  padding-bottom: 0;
}
/* Ревизия 2.0.13 (Пункт 1c): Закреплённая нижняя полоса кнопок «Я поймал» и «Закрыть» */
.modal-sticky-footer {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 14px -16px 0 -16px;
  padding: 10px 16px 12px 16px;
  background: var(--panel);
  border-top: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 20;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.28);
}
