/* =========================================================
   Gaudau.lt – laimikių sekcija
   ========================================================= */

.catches-app {
  border-radius: 20px;
  border: 1px solid var(--line);
  background-image: linear-gradient(160deg, var(--surface-2), var(--surface));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.catches-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

@media (min-width: 900px) {
  .catches-layout {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  }
}

/* ---------- Form panel ---------- */
.catches-form-panel {
  padding: clamp(20px, 3vw, 28px);
  border-bottom: 1px solid var(--line);
}

@media (min-width: 900px) {
  .catches-form-panel {
    border-bottom: 0;
    border-right: 1px solid var(--line);
  }
}

.catches-form-panel h3 {
  font-size: 1.15rem;
  margin-bottom: 4px;
}

.catches-form-lede {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 18px;
  line-height: 1.5;
}

.catches-form {
  display: grid;
  gap: 14px;
}

.catches-field {
  display: grid;
  gap: 6px;
}

.catches-field-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
}

.catches-select,
.catches-form input[type="email"],
.catches-form input[type="password"],
.catches-form input[type="url"],
.catches-form input[type="text"],
.catches-form input[type="number"],
.catches-form input[type="date"],
.catches-form textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background-color: var(--surface-3);
  color: var(--text-strong);
  font-family: inherit;
  font-size: 0.88rem;
  line-height: 1.4;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.catches-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238ba6b3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  background-size: 16px;
  padding-right: 2rem;
  cursor: pointer;
}

.catches-form textarea {
  resize: vertical;
  min-height: 56px;
}

.catches-form input::placeholder,
.catches-form textarea::placeholder {
  color: var(--muted);
  opacity: 0.8;
}

.catches-form input:hover,
.catches-form textarea:hover,
.catches-select:hover {
  border-color: var(--green-line);
}

.catches-form input:focus,
.catches-form textarea:focus,
.catches-select:focus {
  outline: none;
  border-color: var(--green);
  background-color: var(--surface-2);
}

.catches-form input[aria-invalid="true"],
.catches-form textarea[aria-invalid="true"],
.catches-select[aria-invalid="true"] {
  border-color: var(--danger);
  background-color: var(--danger-soft);
}

.catches-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.catches-error {
  min-height: 0;
  font-size: 0.75rem;
  color: var(--danger);
  line-height: 1.4;
}

.catches-error:empty {
  display: none;
}

.catches-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.catches-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.65rem 1.1rem;
  border-radius: 11px;
  border: 1px solid transparent;
  background-image: linear-gradient(135deg, var(--green), var(--green-bright));
  color: #0b1418;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.catches-submit svg {
  width: 16px;
  height: 16px;
}

.catches-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -12px rgba(74, 222, 128, 0.6);
}

.catches-submit:focus-visible {
  outline: 2px solid var(--text-strong);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px var(--green-soft);
}

.catches-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.catches-cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1rem;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background-color: var(--surface-3);
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.catches-cancel:hover {
  background-color: var(--surface-2);
  border-color: var(--green-line);
  color: var(--text-strong);
}

.catches-cancel:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

/* ---------- List panel ---------- */
.catches-list-panel {
  padding: clamp(20px, 3vw, 28px);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.catches-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.catches-list-head h3 {
  font-size: 1.15rem;
}

.catches-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--green);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--green-line);
  background-color: var(--green-soft);
  white-space: nowrap;
}

/* ---------- Toolbar ---------- */
.catches-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.catches-search {
  position: relative;
  flex: 1 1 180px;
  min-width: 0;
}

.catches-search-icon {
  position: absolute;
  top: 50%;
  left: 0.7rem;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  color: var(--muted);
  pointer-events: none;
}

.catches-search-icon svg {
  width: 15px;
  height: 15px;
}

.catches-search input {
  width: 100%;
  padding: 0.55rem 0.75rem 0.55rem 2.1rem;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background-color: var(--surface-3);
  color: var(--text-strong);
  font-family: inherit;
  font-size: 0.85rem;
  line-height: 1.4;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.catches-search input::placeholder {
  color: var(--muted);
  opacity: 0.8;
}

.catches-search input:hover {
  border-color: var(--green-line);
}

.catches-search input:focus {
  outline: none;
  border-color: var(--green);
  background-color: var(--surface-2);
}

.catches-search.has-clear input {
  padding-right: 2.1rem;
}

.catches-search-clear {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background-color: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.catches-search-clear[hidden] {
  display: none;
}

.catches-search-clear:hover {
  background-color: var(--green-soft);
  border-color: var(--green-line);
  color: var(--green);
}

.catches-search-clear:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.catches-search-clear svg {
  width: 12px;
  height: 12px;
}

.catches-sort {
  flex: 0 0 auto;
  width: auto;
  min-width: 150px;
  padding: 0.55rem 2rem 0.55rem 0.75rem;
  font-size: 0.82rem;
}

/* ---------- Status ---------- */
.catches-status,
.catches-filter-status,
.catches-grid-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Grid ---------- */
.catches-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 560px) {
  .catches-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Catch card ---------- */
.catch-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0.85rem 0.9rem;
  border-radius: 13px;
  border: 1px solid var(--line);
  background-color: var(--surface-3);
  min-width: 0;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.catch-card:hover {
  border-color: var(--green-line);
  background-color: var(--surface-2);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -16px rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .catch-card:hover {
  box-shadow: 0 12px 24px -16px rgba(15, 45, 60, 0.25);
}

/* Highlight animation applied when a catch is deep-linked or freshly
   added. Pulses the card border and background so the user can spot it
   instantly. */
.catch-card.is-highlighted {
  animation: catch-card-highlight 1.6s ease-out;
}

@keyframes catch-card-highlight {
  0% {
    border-color: var(--green);
    background-color: var(--green-soft);
    box-shadow: 0 0 0 4px var(--green-soft);
  }
  60% {
    border-color: var(--green-line);
    background-color: var(--green-soft);
    box-shadow: 0 0 0 2px var(--green-soft);
  }
  100% {
    border-color: var(--line);
    background-color: var(--surface-3);
    box-shadow: none;
  }
}

.catch-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.catch-card-species {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.catch-card-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background-color: var(--green-soft);
  color: var(--green);
  flex-shrink: 0;
}

.catch-card-icon svg {
  width: 16px;
  height: 16px;
}

.catch-card-species-name {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-strong);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.catch-card-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.catch-card-action {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 7px;
  border: 1px solid var(--line-strong);
  background-color: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.catch-card-action:hover {
  background-color: var(--green-soft);
  border-color: var(--green-line);
  color: var(--green);
}

.catch-card-action:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.catch-card-action.is-danger:hover {
  background-color: var(--danger-soft);
  border-color: var(--danger);
  color: var(--danger);
}

.catch-card-action svg {
  width: 13px;
  height: 13px;
}

.catch-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.4;
}

.catch-card-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.catch-card-meta-item svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  opacity: 0.8;
}

.catch-card-meta-item span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.catch-card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.catch-card-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  padding: 0.15rem 0.5rem;
  border-radius: 7px;
  border: 1px solid var(--line);
  background-color: var(--surface);
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.5;
}

.catch-card-stat strong {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-strong);
}

.catch-card-notes {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Empty state ---------- */
.catches-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: clamp(24px, 4vw, 36px) 20px;
  border-radius: 14px;
  border: 1px dashed var(--line-strong);
  background-color: var(--surface-3);
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
}

.catches-empty[hidden] {
  display: none;
}

.catches-empty-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 13px;
  border: 1px solid var(--green-line);
  background-color: var(--green-soft);
  color: var(--green);
}

.catches-empty-icon svg {
  width: 22px;
  height: 22px;
}

.catches-empty p {
  margin: 0;
  font-weight: 600;
  color: var(--text-strong);
}

.catches-empty-hint {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--muted);
  max-width: 300px;
  line-height: 1.5;
}

.catches-empty-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 4px;
  padding: 0.5rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--green-line);
  background-color: var(--green-soft);
  color: var(--green);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.catches-empty-reset:hover {
  background-color: var(--green);
  border-color: var(--green);
  color: #0b1418;
  transform: translateY(-1px);
}

.catches-empty-reset:focus-visible {
  outline: 2px solid var(--green-bright);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px var(--green-soft);
}

.catches-empty-reset svg {
  width: 14px;
  height: 14px;
}

/* ---------- More toggle ---------- */
.catches-more {
  margin-top: 12px;
}

.catches-more[hidden] {
  display: none;
}

.catches-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background-color: var(--surface-3);
  color: var(--text);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.catches-more-btn:hover {
  background-color: var(--green-soft);
  border-color: var(--green-line);
  color: var(--text-strong);
}

.catches-more-btn:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.catches-more-count {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background-color: var(--surface);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.5;
}

.catches-more-icon {
  width: 14px;
  height: 14px;
  transition: transform 0.22s ease;
}

.catches-more-btn[aria-expanded="true"] .catches-more-icon {
  transform: rotate(180deg);
}

/* ---------- Reduced motion ---------- */
/* Users who request reduced motion get no hover lift on catch cards and
   no highlight pulse animation. The highlight state still applies its
   static border/background so deep-linked cards remain visually
   distinguishable, but without any animation. */
@media (prefers-reduced-motion: reduce) {
  .catch-card {
    transition: none;
  }

  .catch-card:hover {
    transform: none;
  }

  .catch-card.is-highlighted {
    animation: none;
    border-color: var(--green);
    background-color: var(--green-soft);
    box-shadow: 0 0 0 2px var(--green-soft);
  }

  .catches-submit,
  .catches-cancel,
  .catches-search-clear,
  .catches-empty-reset,
  .catches-more-btn,
  .catches-more-icon,
  .catch-card-action {
    transition: none;
  }

  .catches-submit:hover,
  .catches-empty-reset:hover {
    transform: none;
  }

  .catches-more-btn[aria-expanded="true"] .catches-more-icon {
    transform: rotate(180deg);
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
  .catches-row {
    grid-template-columns: 1fr;
  }

  .catches-toolbar {
    flex-direction: column;
  }

  .catches-search {
    flex: 1 1 auto;
  }

  .catches-sort {
    width: 100%;
  }
}

/* =========================================================
   Catches – markup rendered by catches.js (cards, tools, modals)
   ========================================================= */
.catch-card {
  padding: 0;
  overflow: hidden;
  gap: 0;
}

.catch-card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background-image: linear-gradient(135deg, var(--surface-3), var(--surface-2));
  overflow: hidden;
}

.catch-card-media[data-photo-open] {
  cursor: zoom-in;
}

.catch-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.catch-card-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--green);
  opacity: 0.55;
}

.catch-card-placeholder svg {
  width: 42px;
  height: 42px;
}

.catch-card-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--overlay-line);
  background-color: var(--overlay-bg);
  color: var(--overlay-text);
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.catch-card-delete:hover {
  color: var(--danger);
  background-color: var(--overlay-bg-hover);
}

.catch-card-delete svg {
  width: 15px;
  height: 15px;
}

.catch-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0.8rem 0.9rem 0.9rem;
  min-width: 0;
}

.catch-card-title {
  margin: 0;
  font-size: 1rem;
  color: var(--text-strong);
}

.catch-card-body .catch-card-meta {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--green-bright);
}

.catch-card-date {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catch-card-body .catch-card-notes {
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: var(--text);
  line-height: 1.45;
}

.catch-card-body .catch-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.catch-card-edit,
.catch-card-share {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0.4rem 0.7rem;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background-color: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.catch-card-edit:hover,
.catch-card-share:hover {
  border-color: var(--green-line);
  color: var(--green-bright);
}

.catch-card-edit svg,
.catch-card-share svg {
  width: 14px;
  height: 14px;
}

.catch-card-delete:focus-visible,
.catch-card-edit:focus-visible,
.catch-card-share:focus-visible,
.catch-card-media[data-photo-open]:focus-visible {
  outline: 2px solid var(--green-bright);
  outline-offset: 2px;
}

.catches-form-panel.is-editing {
  box-shadow: inset 3px 0 0 var(--sand);
}

/* Stats */
.catches-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
}

.catches-stats > div {
  padding: 0.6rem 0.75rem;
  border-radius: 11px;
  border: 1px solid var(--line);
  background-color: var(--surface-3);
  min-width: 0;
}

.catches-stats dt {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.catches-stats dd {
  margin: 2px 0 0;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.catches-search-info {
  margin: 0 0 8px;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Photo input */
.catches-photo-drop {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.75rem 0.9rem;
  border-radius: 11px;
  border: 1px dashed var(--line-strong);
  background-color: var(--surface-3);
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.catches-photo-drop:hover {
  border-color: var(--green-line);
  color: var(--text-strong);
}

.catches-photo-drop svg {
  width: 18px;
  height: 18px;
  color: var(--green);
  flex-shrink: 0;
}

#catchPhoto:focus-visible + .catches-photo-preview,
.catches-field:focus-within .catches-photo-drop {
  border-color: var(--green);
}

.catches-photo-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 8px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background-color: var(--surface-3);
}

.catches-photo-preview img {
  width: 64px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
}

.catches-photo-info {
  flex: 1;
  min-width: 0;
  font-size: 0.78rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catches-photo-remove {
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}

.catches-photo-remove:hover {
  color: var(--danger);
  border-color: var(--danger);
}

/* Export / import / clear tools */
.catches-data-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.catches-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.5rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background-color: var(--surface-3);
  color: var(--text);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.catches-tool-btn svg {
  width: 15px;
  height: 15px;
}

.catches-tool-btn:hover {
  border-color: var(--green-line);
  color: var(--text-strong);
}

.catches-tool-btn.is-danger {
  margin-left: auto;
  color: var(--danger);
}

.catches-tool-btn.is-danger:hover {
  border-color: var(--danger);
  background-color: var(--danger-soft);
}

.catches-tool-btn.is-danger.is-solid {
  margin-left: 0;
  background-color: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.catches-tool-btn:focus-visible,
.catches-photo-remove:focus-visible,
.catches-import-summary-close:focus-visible {
  outline: 2px solid var(--green-bright);
  outline-offset: 2px;
}

.catches-import-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 0.6rem 0.8rem;
  border-radius: 11px;
  border: 1px solid var(--green-line);
  background-color: var(--green-soft);
  font-size: 0.82rem;
}

.catches-import-summary-title {
  font-weight: 700;
  color: var(--text-strong);
}

.catches-import-summary-stats {
  display: flex;
  gap: 6px;
}

.catch-import-pill {
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background-color: var(--surface-3);
  color: var(--text);
}

.catch-import-pill.is-skipped {
  color: var(--muted);
}

.catches-import-summary-close {
  margin-left: auto;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

/* Modals (clear-all confirm + photo viewer) */
.catch-modal {
  position: fixed;
  inset: 0;
  z-index: 450;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.catch-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.catch-modal-backdrop {
  position: absolute;
  inset: 0;
  background-color: var(--modal-backdrop);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.catch-modal-dialog {
  position: relative;
  width: min(440px, 100%);
  padding: 24px;
  border-radius: 18px;
  border: 1px solid var(--line-strong);
  background-color: var(--surface);
  box-shadow: var(--shadow);
}

.catch-modal-dialog h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.catch-modal-dialog p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.catch-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

.catch-photo-dialog {
  position: relative;
  margin: 0;
  max-width: min(960px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.catch-photo-dialog img {
  max-width: 100%;
  max-height: calc(100vh - 120px);
  object-fit: contain;
  border-radius: 14px;
}

.catch-photo-dialog figcaption {
  color: var(--overlay-text);
  font-size: 0.9rem;
  text-align: center;
}

.catch-photo-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--overlay-line);
  background-color: var(--overlay-bg);
  color: var(--overlay-text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.catch-photo-close:focus-visible {
  outline: 2px solid var(--green-bright);
  outline-offset: 2px;
}

body.confirm-modal-open,
body.photo-modal-open {
  overflow: hidden;
}

/* Toast */
.catch-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 500;
  max-width: calc(100% - 32px);
  padding: 0.7rem 1.1rem;
  border-radius: 12px;
  border: 1px solid var(--green-line);
  background-color: var(--surface);
  color: var(--text-strong);
  font-size: 0.88rem;
  box-shadow: var(--shadow);
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.catch-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.catch-toast.is-error {
  border-color: var(--danger);
}

@media (prefers-reduced-motion: reduce) {
  .catch-modal,
  .catch-toast {
    transition: none;
  }
}

/* Visually hide the native file input (the styled label opens it). */
#catchPhoto {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
  opacity: 0;
}

/* Cards without a photo get a slim banner instead of a tall empty box. */
.catch-card-media:not([data-photo-open]) {
  aspect-ratio: auto;
  height: 56px;
}

.catch-card-media:not([data-photo-open]) .catch-card-placeholder svg {
  width: 26px;
  height: 26px;
}
