.identify-species-photo-selector {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid rgba(39, 49, 31, 0.12);
  border-radius: 0.75rem;
  background: #fffdf8;
  box-shadow: 0 14px 34px rgba(39, 49, 31, 0.1);
}

.identify-species-photo-selector--home {
  gap: 1.5rem;
  border-color: rgba(40, 54, 24, 0.1);
  border-radius: 1rem;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(32, 32, 32, 0.12);
}

.identify-species-photo-selector__preview {
  min-height: 13rem;
  border: 1px dashed rgba(95, 111, 63, 0.34);
  border-radius: 0.6rem;
  overflow: hidden;
  background: rgba(217, 223, 200, 0.34);
  display: grid;
  place-items: center;
}

.identify-species-photo-selector--home .identify-species-photo-selector__preview {
  min-height: 18rem;
  border-color: rgba(96, 108, 56, 0.35);
  border-radius: 0.8rem;
  background: rgba(96, 108, 56, 0.08);
}

.identify-species-photo-selector__image {
  width: 100%;
  height: 100%;
  min-height: 13rem;
  -o-object-fit: cover;
     object-fit: cover;
  display: block;
}

.identify-species-photo-selector--home .identify-species-photo-selector__image {
  min-height: 18rem;
}

.identify-species-photo-selector__placeholder {
  display: grid;
  justify-items: center;
  gap: 0.65rem;
  color: rgba(39, 49, 31, 0.62);
  font-weight: 800;
}

.identify-species-photo-selector--home .identify-species-photo-selector__placeholder {
  gap: 0.75rem;
  color: rgba(40, 54, 24, 0.62);
  font-weight: 700;
}

.identify-species-photo-selector__content {
  display: grid;
  gap: 0.85rem;
  align-content: center;
}

.identify-species-photo-selector--home .identify-species-photo-selector__content {
  gap: 1rem;
}

.identify-species-photo-selector__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.identify-species-photo-selector__button {
  min-height: 2.7rem;
  padding: 0 1rem;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.identify-species-photo-selector--home .identify-species-photo-selector__button {
  min-height: 2.75rem;
  display: flex;
  font-size: 0.875rem;
  font-weight: 700;
}

.identify-species-photo-selector__button:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.identify-species-photo-selector__button--primary {
  background: #5f6f3f;
  color: #ffffff;
}

.identify-species-photo-selector__button--primary:hover:not(:disabled) {
  background: #33411d;
}

.identify-species-photo-selector--home .identify-species-photo-selector__button--primary {
  background: #606c38;
}

.identify-species-photo-selector--home .identify-species-photo-selector__button--primary:hover:not(:disabled) {
  background: #283618;
}

.identify-species-photo-selector__button--secondary {
  border-color: rgba(95, 111, 63, 0.34);
  background: #ffffff;
  color: #5f6f3f;
}

.identify-species-photo-selector__button--secondary:hover:not(:disabled) {
  background: rgba(95, 111, 63, 0.08);
  border-color: #5f6f3f;
}

.identify-species-photo-selector--home .identify-species-photo-selector__button--secondary {
  color: #606c38;
  border-color: rgba(96, 108, 56, 0.35);
}

.identify-species-photo-selector--home .identify-species-photo-selector__button--secondary:hover:not(:disabled) {
  background: rgba(96, 108, 56, 0.08);
  border-color: #606c38;
}

.identify-species-photo-selector__input {
  display: none;
}

.identify-species-photo-selector__meta,
.identify-species-photo-selector__message {
  margin: 0;
  color: #5e6751;
  font-size: 0.92rem;
}

.identify-species-photo-selector--home .identify-species-photo-selector__meta,
.identify-species-photo-selector--home .identify-species-photo-selector__message {
  color: rgba(40, 54, 24, 0.72);
}

.identify-species-photo-selector__message--error {
  color: #b42318;
  font-weight: 700;
}

.identify-species-photo-selector__message--success {
  color: #606c38;
}

.identify-species-photo-selector__spinner {
  animation: identify-species-spin 0.8s linear infinite;
}

.identify-species-organ-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(20, 25, 16, 0.58);
}

.identify-species-organ-modal__dialog {
  width: min(100%, 42rem);
  max-height: min(90vh, 44rem);
  overflow: auto;
  border-radius: 0.75rem;
  border: 1px solid rgba(40, 54, 24, 0.14);
  background: #fffdf8;
  box-shadow: 0 24px 64px rgba(20, 25, 16, 0.28);
}

.identify-species-organ-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.25rem 0.75rem;
  border-bottom: 1px solid rgba(40, 54, 24, 0.1);
}

.identify-species-organ-modal__header h3 {
  margin: 0;
  color: #283618;
  font-size: 1.35rem;
}

.identify-species-organ-modal__header p {
  margin: 0.3rem 0 0;
  color: rgba(40, 54, 24, 0.68);
  font-size: 0.95rem;
}

.identify-species-organ-modal__close {
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid rgba(96, 108, 56, 0.22);
  border-radius: 0.5rem;
  background: #ffffff;
  color: #283618;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.identify-species-organ-modal__close:hover {
  background: rgba(96, 108, 56, 0.08);
}

.identify-species-organ-modal__form {
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
}

.identify-species-organ-modal__options {
  display: grid;
  gap: 0.75rem;
}

.identify-species-organ-modal__option {
  width: 100%;
  min-height: 4.5rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(96, 108, 56, 0.24);
  border-radius: 0.5rem;
  background: #ffffff;
  color: #283618;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.identify-species-organ-modal__option:hover {
  background: rgba(96, 108, 56, 0.06);
  border-color: rgba(96, 108, 56, 0.5);
}

.identify-species-organ-modal__option--selected {
  background: #f1f5e6;
  border-color: #606c38;
  box-shadow: inset 0 0 0 1px #606c38;
}

.identify-species-organ-modal__option strong,
.identify-species-organ-modal__option small {
  display: block;
}

.identify-species-organ-modal__option strong {
  font-size: 0.98rem;
}

.identify-species-organ-modal__option small {
  margin-top: 0.2rem;
  color: rgba(40, 54, 24, 0.68);
  line-height: 1.35;
}

.identify-species-organ-modal__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
  padding-top: 0.25rem;
}

.identify-species-loading {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(20, 25, 16, 0.72);
  backdrop-filter: blur(6px);
}

.identify-species-loading__panel {
  width: min(100%, 22rem);
  min-height: 13rem;
  padding: 2rem;
  border: 1px solid rgba(255, 253, 248, 0.22);
  border-radius: 0.75rem;
  background: #fffdf8;
  color: #283618;
  box-shadow: 0 28px 70px rgba(20, 25, 16, 0.34);
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 0.75rem;
  text-align: center;
}

.identify-species-loading__spinner {
  color: #606c38;
  animation: identify-species-spin 0.8s linear infinite;
}

.identify-species-loading__panel strong {
  font-size: 1.25rem;
}

.identify-species-loading__panel span {
  color: rgba(40, 54, 24, 0.68);
  line-height: 1.4;
}

@keyframes identify-species-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (min-width: 760px) {
  .identify-species-photo-selector {
    grid-template-columns: minmax(16rem, 0.55fr) minmax(0, 1fr);
  }
}

@media (min-width: 768px) {
  .identify-species-photo-selector--home {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 1.25rem;
  }
}

